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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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