Compiling A Program And Modifying The Hello Program-Computer Programming-Assignment, Exercises of Computer Engineering and Programming

This assignment is for Computer Programming course. It was assigned by Prof. Anurag Negi at KIIT University. It includes: Unified, Hello, Program, Modify, Algorithm, Copy, Code, Spider, Draw

Typology: Exercises

2011/2012

Uploaded on 07/20/2012

savitri_85
savitri_85 🇮🇳

4

(5)

70 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Problem C2. (Unified Computers and programming)
Start with downloading 2 files from the CP web page: screen.ads and screen.adb.
1. Modify the “Hello” program shown in class (Lecture C2) to display the following
text on the screen
Hello World
My name is Your Name
Ensure that the output of your program occurs on two separate lines as shown
above. Turn in a hard copy of your code listing and an electronic copy of your
code.
2. Compile Spider_Crash (Program 2.10, Page 56, Feldman Koffman). Redirect
the output of your program into a file (In AdaGIDE, use menu Run Æ Run
Options). What is the output of running the program? (It is sufficient to print the
contents of the output file)
3. Write an algorithm to use the Feldman “spider package” to draw an inverted
triangle as shown below. Turn in a hard copy of your code listing and an
electronic copy of your code.
RRRRRRR
R
R
R R
R
Hint: Start the spider facing west; draw the top line and so on. The spider can
draw a blank by changing the color to ‘None’. Read Program 2.5 (Page 47,
Feldman Koffman) and Program 2.6 (Page 50, Feldman Koffman).
docsity.com

Partial preview of the text

Download Compiling A Program And Modifying The Hello Program-Computer Programming-Assignment and more Exercises Computer Engineering and Programming in PDF only on Docsity!

Problem C2. (Unified Computers and programming)

Start with downloading 2 files from the CP web page: screen.ads and screen.adb.

  1. Modify the “Hello” program shown in class (Lecture C2) to display the following text on the screen

Hello World My name is Your Name

Ensure that the output of your program occurs on two separate lines as shown above. Turn in a hard copy of your code listing and an electronic copy of your code.

  1. Compile Spider_Crash (Program 2.10, Page 56, Feldman Koffman). Redirect the output of your program into a file (In AdaGIDE, use menu Run Æ Run Options). What is the output of running the program? (It is sufficient to print the contents of the output file)
  2. Write an algorithm to use the Feldman “spider package” to draw an inverted triangle as shown below. Turn in a hard copy of your code listing and an electronic copy of your code.

RRRRRRR R R R R R

Hint : Start the spider facing west; draw the top line and so on. The spider can draw a blank by changing the color to ‘None’. Read Program 2.5 (Page 47, Feldman Koffman) and Program 2.6 (Page 50, Feldman Koffman).

docsity.com