Programming Assignment 4, C/C++ Programming

For this program, you are going to modify your previous program (program 3) so that it will now have a menu to see if the user wants to read the input from a file or interactively. If the user wants to read the input from a file, then the output will also go into a different file. If the user wants to read the input interactively, then the output will go to the screen.

Your initial menu will look like the following:
Menu
<1> Read data from a file
<2> Read data interactively
Enter choice:

Here is a sample input file:

21 25
30 30
10 12
55 60
-1 /* this is the flag to end inputting the assignment data */
21 25
30 30
10 12
21 25
30 30

Here is another sample input file:

21 25
30 30
10 12
55 60
-1 /* this is the flag to end inputting the assignment data */
21 25
-1 /* this is the flag to end inputting the midterm exam data */
21 25
30 30


On the due date, students should hand in an updated/corrected flow chart of the program and a printout of the source code (make sure it is documented properly according to the UHCL guidelines) (in an envelope) during class, and upload the source code to the link on my website.
Posted Date: 4/5/2013 11:26:15 AM | Location : United States







Related Discussions:- Programming Assignment 4, Assignment Help, Ask Question on Programming Assignment 4, Get Answer, Expert's Help, Programming Assignment 4 Discussions

Write discussion on Programming Assignment 4
Your posts are moderated
Related Questions
Enumerated Constants Enumerated constants enable the creation of new types and then explain variables of these types so that their values are restricted to a set of possible va

What are pre-processor directives? - Pre-processor directives are placed at the beginning of a C program. They begin with # symbol. - This is the place, where library files

Described the ISA and HASA class relationships. How would you apply each in a class design? A: A specialized class "is" specialization of another class and, thus, has the ISA re

when you allocate memory with new[], you ought to free the memory via delete[]. While you allocate memory along 'new', then use 'delete' with no the brackets. You employ new[] to a

What if one forget the [] when deleteing array allocated through new T[n]? A: All life comes to a disastrous end. It is the programmer's responsibility not the compiler's to

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Define the Int Data Type of C Language? The int is used to define integer numbers. The Integers are whole numbers with a range of values supported by a particular machine and t

limitation of linear array


Primarily the term alignment refers the tendency of an address pointer value to be a multiple of some power of two. Thus a pointer with two byte alignment contains a zero in the le