Create a cpp program to manage the list of enrolled students

Assignment Help C/C++ Programming
Reference no: EM131667276

Assignment: Programming and Data Structures

Introduction

In this homework, you will create a C++ program to manage the list of enrolled students in a university. The data of each student will be stored as nodes of an ordered linked list. You should be able to add and delete students from the list, and perform other operation on the stored data.

Student information include:

• ID number (integer of 5 digits)
• First name
• Last name
• Major
• GPA (double, between 0 and 4)
• Current Credit Enrolled (integer, between 0 and 15)

Input and Output

The input is a single text file. Each file is divided in blocks that call different operations on the linked list, followed by the necessary arguments. The name used to declare the instruction to execute will be all in upper cases. Each new argument is in a new line of the file. Your program should go through the file and execute all the listed operations, and terminate when the end of file is reached.

It is fair to assume that all calls will be in upper case letters and will always be separated by an empty line, even when the number of arguments is incorrect for the function call. The file terminates with new line and EOF.

Example 1 of input

INSERT 03948
Tom Brady Physics 3.40
12

INSERT 03491
Joe Flacco
Chemistry

3.91
12
PRINT_ROSTER PRINT_STUDENT
Joe Flacco
<EOF>

The output of each function call should be appended to an output file (name specified in the command line).

Example 1 of output
Tom Brady, 03948
Joe Flacco, 03491

Joe Flacco, 03491 Major: Chemistry GPA: 3.91
Credits enrolled: 12

Complete list of instruction calls for ordered linked list

Call

Description

Arguments

Output

INSERT

Insert a new student in the linked list ORDERED BY LAST NAME.Duplicates should be rejected (by ID or first + last name)

ID_number First Name Last Name Major GPA Current Credits

-

PRINT_ROSTER

Print first name, last name and ID of all

students

-

<FirstN> <LastN>, <ID>

...

PRINT_BY_MAJOR

Print first name, last name and ID of all

students in a major

Major

<FirstN> <LastN>, <ID>

...

PRINT_BY_GPA

Print first name, last name and ID of all students with GPA greater or equal to

argument

GPA

<FirstN> <LastN>, <ID>

...

PRINT_STUDENT

Print student all data of

First Name Last Name

<FirstN> <LastN>, <ID> Major: <Major>

GPA: <GPA>

Credits Enrolled: <CurrentCE>

DELETE_STUDENT

Delete student from

list based on first and last name

First Name Last Name

-

DELETE_ID

Delete student from list     based on ID number

ID number

-

UPDATE_GPA

Set GPA of student to new value

First Name

Last Name GPA

-

UPDATE_MAJOR

Change student major to new value

First Name

Last Name Major

-

ADD_CLASS

Add class for student (reflects    on    credits

enrolled)

First Name Last Name

credits

-

REMOVE_CLASS

Remove      class                 for student                 (reflects    on

credits enrolled)

First Name Last Name

credits

-

GPA

Compute average GPA across students

-

GPA mean: <average_GPA>

The main C++ program will become the executable to be tested by the TAs. The result should be written on another text file (output file), provided on the command line. The input and output files are specified in the command line, not inside the C++ code.

The general call to the executable (sum_rowcol, in this example) is as follows:

uni_roster "A=<file>;C=<file>"

Call example with one input file and another output file.
uni_roster "A=a.txt;C=c.out"

Requirements

• Your ordered linked list must inherit from the linkedListType ADT presented in class and available in the book (pg. 278-292).

• It is NOT allowed to use vector classes or other classes provided in the STL.

• Your C++ code must be clear, indented and commented.

• Each function call should check for input correctness. If the input is of invalid format, do not perform the operation and print an error on screen. Examples of input correctness include right number and type of arguments, or checking for argument boundaries (for GPA, credits and ID).

• GPA must be printed with 2 decimal points.

• Your program will be tested with GNU C++. Therefore, you are encouraged to work on Unix, or at least make sure that your code compiles and runs successfully on the server.

• You can use other C++ compilers, but the TAs cannot provide support or test your programs with other compilers.

• The output file must contain the result in the format specified in the table. A single empty line should separate each output segment.

Reference no: EM131667276

Questions Cloud

Does the arizona senate bill 1070 promote racial profiling : Does the Arizona Senate Bill 1070 promote racial profiling and is it at face value a racist bill as some contend?
What the zapatista documentary : What the Zapatista documentary and write this assignment. The question is, what are you view the Zapatista movement?
Show how to modify the union-find algorithm : Show how to modify the union/find algorithm so that the running time of a sequence of M union, find, and remove operations is still O(Ma(M, N)).
Relationship between religion and popular culture : Find an image or video that will help the class understand the relationship between religion and popular culture and the topic above.
Create a cpp program to manage the list of enrolled students : In this homework, you will create a C++ program to manage the list of enrolled students in a university.
Relationship between religion and popular culture : Find an image or video (if using a television ad) that will help the class understand the relationship between religion and popular culture and the topic above.
Implement partial path compression : Suppose that you implement partial path compression on find(i) by changing the parent of every other node on the path from i to the root to its grandparent.
Complete all written pieces in a formal and logical manner : Complete all instructions for your chosen FOA very precisely - Construct all forms or documents in a highly professional manner
Portfolio creation process meaningful : To what extent do you find the portfolio creation process meaningful?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  How do classes in c++ provide support for abstract types

How do classes in C++ provide support for abstract types? Provide an example

  Technical skills on opengl programming

CG 200 Computer Graphics - "Under the Sea" using OpenGL - your imaginations and use OpenGL with C/C++ programming to produce a scene(s) that represents what you envision could possibly be seen under the sea. Please note that an image with just the ..

  Create a file, shared.txt

When your program starts, it shall do the following:1. Create a file, SHARED.txt, in the current directory (cwd). 2. Write it's pid (Process ID) followed by a Carriage Return and Newline in the file.

  Implement the algorithm for evaluating postfix expressions

Write a program to implement the algorithm for evaluating postfix expressions that involve only singledigit integers and the integer operations.

  Write a prototype for a function named triple

Write a prototype for a function named triple that returns a double and has one integer parameter and

  Cancer genome identification tool

Cancer Genome Identification Tool - Create structure charts for a given problem - Determine an appropriate functional decomposition or top-down design from a structure chart

  Write a c function void print_triangle(int n)

Write a C function void print_triangle(int n) that prints a triangular pattern of asterisks of height n and width 2 * n + 1 with one asterisk in the first line, three in the second line, etc.,

  Write a program that reads from a file a list of course name

Write a program that reads from a file a list of course names, letter grades for each course and number of credits each course is worth. The program will read each course name, grade earned and number of credits from the file and print out the course..

  Design a new class c non-routable network

Design a new Class C non-routable network

  Write a declaration for s structure named car

Write a declaration for s structure named cars. The fields in the record should include make, model, year and cost. Include a constructor to initialize the value in the structure.

  Recognize a string typed in as a valid or invalid

Use regex to recognize valid Social Security numbers.  A valid Social Security number consists of three digits, an optional hyphen, two digits, an optional hyphen, and four digits.

  Writer a program that allows the user to enter an unknown

writer a program that allows the user to enter an unknown number of characters stores those characters in a data

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd