1. Engineering
  2. Computer Science
  3. please use c to write this program you don not...

Question: please use c to write this program you don not...

Question details

Please use C++ to write this program. you don not need to write it using any software. Only write the correct code to solve the problem.    

Firat Stueton ST ST. 3 L 2 3 4 5 6 7 89 LO A. L 2 3 4 S 6 7 8 9 LO AV Model your program after the hurdles race example from lecture. A file containing the hurdles race code from lecture is available as SPUB/kpa2start.cc. Use only the C++ statements covered so far, this corresponds to items #1 through # 15 of the Karel the Robot Programming Summary handout. Do NOT use any looping constructs. Also, do NOT use any recursion, that is, no functions call themselves. Do all your work in the OLA directory. Use as your source file name superhurdles.cc. Document your program with: (1) the program header comment block, and (2) brief description of each user defined function. Compile the program with: $kCC superhurdles.cc -o hurdlesRun If the compile is successful, an executable file named hurdlesRun will be generated.superhurdlesOne.wor and superhurdlesTwo.wor. They can be copied from the SPUB directory using the command: S cp SPUB/superhurdlesOne.wor superhurdlesOne.wor S cp SPUB/superhurdlesTwo.wor superhurdlesTwo.wor Once the Karel world files are copied into your directory. Run your program against these world files: S hurdlesRun superhurdlesOne.wor S hurdlesRun superhurdlesTwo.worHow to turn in your program: Once your program works properly, you need to electronically turn in the program using D2L Dropbox. Log into MTSU D2L site. Select the course Computer Science 1: CSCI 1170 Locate the dropbox named OLA 2 and upload these five files: superhurdles.cc superhurdlesOne. wor superhurdlesOne.wor.rpt superhurdlesTwo.wor superhurdlesTwo.wor.rpt Helpful notes for OLA2 Because it is still early in the semester and youve had relatively little practice in using the NX Linux Gnome, use the following as guidance if you are having trouble completing the assignment. (Remember, do not enter the $ prompt when typing UNIX commands.) From the homework handout: 1) Do all your work in the OLA directory. What to do in UNIX: $ cd OLA2) ... superhurdlesOne.wor and superhurdlesTwo.wor SPUB directory using the command.. can be copied from the What to do in UNIX: S cp SPUB/superhurdlesOne.wor superhurdlesOne.wor $ cp SPUB/superhurdlesT wo.wor superhurdlesTwo.wor 3) A file containing the hurdles race code from lecture is available as $PUB/kpa2start.cc. Use as your source file name superhurdles.cc. What to do in UNIX S cp SPUB/kpa2start.cc superhurdles.cc 4) to edit your source program.. What to do in UNIX: $scite superhurdles.cc & Use the cditor to make the changes you need.$scite superhurdles.cc & Use the editor to make the changes you need S kCC superhurdles.cc -o hurdlesRun 5) A practiced in the closed labs, to compile the program in the UNIX terminal using: 6) Now run the program against the world file using: S hurdlesRun superhudlesOne.wor and $ hurdlesRun superhudlesTwo.wor 7) If things dont work out as you want, you will have to go back and repeat some steps. For instance, if your program fails to compile in step 5, you need to use scite to make changes to the source file, save the source file, and then try to compile again. If in step 6 your program fails to behave as you wanted, then you must figure out what to change in your code, make changes to the source file, save the source file, and then compile again and then run it again.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution