Question: *****LANGUAGE IN C++***** NOTE NO data validation is required for this lab.. PART 1:: build and test a simple class Create a class that represents

*****LANGUAGE IN C++*****

NOTE NO data validation is required for this lab..

PART 1:: build and test a simple class

Create a class that represents a Course..

Attributes are::

Course id (ssuch as CS145 assume no spaces in course id))

Number of credits - integer

Letter g rade char

Functions::

a default constructor

a parameterized constructor that sets course id,, credits,, grade

approprate set//gget funct ions for each of the attributes

Make sure to TEST THIS CLASS before moving on :

create an object

store values

make s ure you can retrieve the values

PART 2:: Build a class that uses the Course class with Composition

C reate a Student class to store information a student and the courses they have taken.. A Student may have multiple courses on their transcript..

Attributes are::

s tudent name (jjust use a single name if you are not clear about getline issue s )

student id number (aan integer))

A list of courses represented by a vector of Course type

Functions

a default constructor

a parameterized constructor that receives the name and id number

set and get methods for name

set and get methods for id number

addC ourse function ( receives name,, credits,, grade OR a Course object )

getGPA function ( calculates and returns the GPA )

print transcript (pprints the students transcript including GPA

A students

GPA is based on the class credits and

the

grade

in each class..

Each letter grade is

assigned a point value as follows::

A = 4 points

B = 3 points

C = 2 points

D = 1 point

You calculate ggrade points for each class by multiplying the credits times the value associated with

the letter grade..

A

n A in a 3 unit class is equivalent to 12 grade points (44 for the A times 3 unit class))

A C in a 4 unit class is equivalent to 8 gra

de points (22 for the C times 4 unit class))

This

is a total of 20 grade points..

GPA is

then

calculated by adding up the total grade points and dividing by the total class

credits,, so in this case::

(44 x 3)) + (22 x 4)) = 12 + 8 =

20 grade points / 7 credits =

2.85 GPA

Make sure to TEST this class to make sure

all functions work with a single Student

object

(yyou

can just hard code some test data,, NO user input))

.

Create a Student object

Set the name to some value

Set the id to some value

Add a course,, any name,, 3 units,, grade of A

Add a course,, any name,, 4 units,, grade of C

Print the GPA (iit should be 2.85 based on example above))

Print the transcript

You should NOT CONTINUE until this works (nno user input,, simple test))..

PART 3 , create the aapp,, a stu dent registration program

The app will have a vector of Student type .

It has a main menu,, and a student menu..

You should PLAN this code before you start!! Think about the best way to modularize the code.. Create FUNCTIONS to handle the options.. Work on ONE thing at a time.. Make a ttest plan of how you will approach and test this program!!

Main menu options::

1 Register a n ew student Add a new student to the vector.. Prompt for name.. Assign an ID number (yyour program should start with 1001 and assign numbers sequentially))

2 - Returning student Input the ID number and search the vector for this particular student.. If you find the student,, offer the student options and update information for that student.. If not found,, give message..

Student menu options are::

1 - Add class Add a class to that particular student . Prompt for class name,, credits,, and grade

2 - Check GPA D isplay the students GPA

3 - Print transcript Print the transcript of all courses and grades for this student and GPA

Here is a sample run to demonstrate b asic functionality of the menu options . It is NOT a complete test.. You should create your own testing scenario to prove that your system works!! You need to demonstrate adding multiple classes,, dealing with multiple students..

MAIN MENU

1 New student

2 - Returning student

3 - Quit

Enter choice:: 1

Enter name:: Prof P

Prof P you are registered!! Student number is 1001..

MAIN MENU

1 New student

2 - Returning student

3 - Quit

Enter choice:: 1

Enter name:: Joe Smith

Joe Smith you are registered!! Student number is 1002..

MAIN MENU

1 New student

2 - Returning student

3 - Quit

Enter choice:: 2

Enter ID:: 1001

Welcome Prof P !

STUDENT MENU

1 - Add class

2 - Check GPA

3 - Print transcript

4 - Quit

Enter choice:: 3

You have no courses

STUDENT MENU

1 - Add class

2 - Check GPA

3 - Print transcript

4 - Quit

Enter choice:: 1

Course ID?? CS102

Units?? 3

Grade?? B

Course added

STUDENT MENU

1 - Add class

2 - Check GPA

3 - Print transcript

4 - Quit

Enter choice:: 2

Your GPA is 3 .000

STUDENT MENU

1 - Add class

2 - Check GPA

3 - Print transcript

4 - Quit

Enter choice:: 3

Transcript for:: Prof A

===================================================

Course Grade

CS102 B

GPA:: 3.00

STUDENT MENU

1 - Add class

2 - Check GPA

3 - Print transcript

4 - Quit

Enter choice:: 4

Goodbye Prof P!!

MAIN MENU

1 New student

2 - Returning student

3 - Quit

Enter choice:: 2

Enter ID : 1010

Sorry,, 1010 is not a valid student ID

MAIN MENU

1 New student

2 - Returning student

3 - Quit

Enter choice:: 3

Goodbye!!

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!