Question: This is a short C++ Programming assignment. I really need help on this. The 1st photo is a picture of the directions of the program,

This is a short C++ Programming assignment. I really need help on this. The 1st photo is a picture of the directions of the program, the second picture will be the information given to enter into the program, and the last section is a template in which the program needs to be written in. Thank you!

 This is a short C++ Programming assignment. I really need help

____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________on this. The 1st photo is a picture of the directions of________________________________________________________________________________________________________________________________

/************************************************************************** Program Title: Process Program Description: This program manages an I/O process list and a ready process list for an OS. The program will manipulate the lists based on a process requirements from a loaded file. ***************************************************************************/

#include #include #include #include #include

using namespace std;

struct processType { unsigned int id; //Process ID string name; //Process name unsigned int runTime; //Process Running Time };

class processes { public:

void loadList(); //Load process lists into list array void insertList(); //Insert a process into a process list void deleteProcess(); //Delete a process from a process list void retrieveProcess(); //Retrieve and print an individual a process from a process list void printProcessList(); //Prints a proces from a process list processes(); // Default Constructor

private:

processType listAry[200]; //Input/Ouput array list int size; //Variable to hold size of arrays void printList() const; //Prints processes of a list };

processes::processes() { size = 0; //Initialize size }

void processes::loadList() { ifstream infile; string filename;

cout > filename;

infile.open(filename); size = 0; while (!infile.eof()) { infile >> listAry[size].id; infile >> listAry[size].name; infile >> listAry[size].runTime; size++; } infile.close(); }

void processes::printList() const { cout

for (int i = 0; i

void processes::insertList() { int tempID, tempRT; string tempName;

//Create ID cout > tempID;

//Create process ID name cout > tempName;

//Create run time cout > tempRT;

listAry[size].id = tempID; //Assign TempID to size.id location listAry[size].name = tempName; //Assign tempName to tempName location listAry[size].runTime = tempRT; //Assign tempRT to runTime location size++;

cout

void processes::deleteProcess() { int delProcess;

cout > delProcess;

int pos = -1; //Variable holds position in array bool found; //variable for found value

found = false;

for (int i = pos; i

if (found == false) std::cout

else if (found == true) { for (int i = pos; i

cout

void processes::retrieveProcess() { int retrieveID;

cout > retrieveID;

int pos = -1;

for (int i = pos; i

void processes::printProcessList() { printList(); cout

int menu() { int response;

cout

cout > response;

return response; }

int main() {

processes Process; //Decalre object for a process

int size; ifstream infile; int list = -1; //Deterimines which process list char answer; int selection;

cout

Process.loadList();

do { selection = menu();

switch (selection) { case 1: Process.printProcessList(); break; case 2: Process.insertList(); break; case 3: Process.deleteProcess(); break; case 4: Process.retrieveProcess(); break; case 0: exit(0); break; default:cout

system("pause");

} while (selection != 0);

system("pause"); return 0; }

CSC 372 Program Assignment 1: Due Date September 20h 11:59 PM Due Date: Tuesday, September 4th 1:29 PM Program Summary Write a C++ object-oriented program to manage a file system for students at Norfolk State University: First Name- string Last Name -string Student ID- unsigned integer Email-string GPA - float The program will manipulate the student list based on students from the file students.dat Class requirements 1. Create a student class or struct based on the student structure 2. Create a students class which contains three private members-an array of students, the size of the array, and a function to print the contents of a process. The processes class will also provide the following functionality a. b. c. d. e. f. g. h. Load data from a data file into a student list Retrieve and print a student from the student list Insert a student into the student list Delete a student from the student list Print the contents of a student record Print the contents for a list of students Sort the student list by last Name Sort the student list by GPA Processing requirements 1. 2. 3. Load the students file students.dat Create a menu to carry out the given operations Implement input validation to avoid erroneous program errors

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!