Question: please help me with this assignment it's urgent, so far I have semester & student classes the code is below, I need help with creating

please help me with this assignment it's urgent, so far I have semester & student classes the code is below, I need help with creating a grade class that does T F C G O commands

please help me with this assignment it's urgent, so far I have

semester & student classes the code is below, I need help with

creating a grade class that does T F C G O commands

My code:

class semester

{

private: int prog; int tests;

int exams;

float wt_p;

float wt_t;

float wt_e;

vector stu_rec;

public:

semester() { prog = 0; tests = 0; exams = 0; wt_p = 0.0; wt_e = 0.0; wt_t = 0.0; };

void set_prog(int); void set_test(int);

void set_exam(int); void set_wt(int, int, int);

void add_student(student);

int get_p() const; int get_e() const;

int get_t() const;

float sum_of_wt() const;

};

class student

{

private: string fname;

string lname;

int stu_num;

vector stu_grades;

public:

student(string fn, string ln, int stunum){lname = ln; fname = fn; stu_num = stunum;}

void set_fname(string);

void set_lname(string);

void set_stunum(int);

string get_name() const;

int get_stunum() const;

};

Write a program that automates an instructor's grade book. This program processes commands to add student names, record and alter grades, calculate a final semester grade and print out the student information in different orders. The instructor (the user) interacts with the program through a simple command-based user interface. Input 1. The retained student information, generated in previous executions of this program, is input from file "Grades.dat" at the beginning of each execution of the program. 2. The commands from the instructor are input (in response to "user-friendly" prompts from the program) as single letters. The commands are discussed in detail in the Processing instructions below. Output 1. Responses to user commands are to be written to the screen, as described in the Processing instructions below. 2. A summary of each command's transaction must be written to a text file called "Grades.trn". You may determine the format of this file; it should be labeled and formatted clearly. 3. The output from command O (Output) should be printed to file "Grades.out", as described in the Processing instructions below. 4. The updated grade information must be saved to file "Grades.dat". Processing The user commands are printed to the screen as a menu, and the user responds with a single-letter command. Some commands require the program to prompt the user to enter additional information. After each command is processed, the menu should be redisplayed. The commands are to be processed as described in the following table: NOTE: The S (Setup) command must be made (once per semester) before any of the other commands can be executed. If this command is made in a particular execution of the program, the "Grades.dat" input file should be ignored, and the grades data structure should be initialized to the empty state. Program Enhancement Modify the O (Output grades) command to prompt the user to indicate in which order the grade data must be printed: alphabetically by name (last name/first name) or by student number (in increasing order). Data Structures The design of the grade book data structure is an important part of this program. You may use any of the ADTs that we have discussed so far this semester. The "application" parts of your program may only access the data structure through the set of operations that are specified for the ADTs that you use. The more effective your use of abstract data types, the better your program (and your grade) will be. Schedule This is a large program, which you should implement and test in more than one development iteration. 1. In the first iteration, you should build your program "shell" -- the outer control structure, leaving stubs in place of the code for all of the command processing. 2. In the second iteration, you should replace the stubs for the A (Add student), O (Output grade data), and Q (Quit) commands with the actual processing procedures. 3. In the third iteration, you should replace the stubs for the P,T, and F commands with the actual processing procedures. To support the range checking in these procedures, the stub for the S command should set the number and weights of tests, programs, and final exam as follows: 4. In the fourth iteration, you should replace the stubs for the S,C, and G commands with the actual processing procedures. Testing The testing of each of the development iterations may be performed using test data of your choice. You must develop and implement a testplan at every iteration of program development. You need to execute the program more than one time. Make a hard copy of each of the output files ("Grades.trn" and "Grades.out") after each test run, as the program rewrites these files each time it is executed. Deliverables - Tested source program listing for each iteration of program development. - Hard copies of files "Grades.dat" and "Grades.out", from each of the final test executions. - Implemented test plans and test drivers if appropriate

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!