Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

OBJECTIVES This assignment has you work with classes. INSTRUCTIONS Your software-consulting firm, Awesome Software, LLC, is now more successful than ever. Due to your reputation,

OBJECTIVES

This assignment has you work with classes.

INSTRUCTIONS

Your software-consulting firm, Awesome Software, LLC, is now more successful than ever. Due to your reputation, the Information Technology department at APSU recently contacted you about developing a prototype. They are thinking about replacing D2L with a new system. They are currently evaluating systems that can calculate students GPAs from the classes they took and the grades they received. If you can write a quality piece of software, you will win the contract for the full system and move into the big-time with other software development firms such as IBM and Oracle. Cha-ching!!!

Create a project in Visual C++ Express named Pass6 and add a .cpp file named pass6.cpp. In the code, define two classes:

The first class represents a single student. It should have the following attributes:

First name: a string

Last name: a string

A-number: a string

Number of courses: an integer

GPA: a double

Courses a pointer to a Course object

The second class represents an academic course that the student has taken. It should have the following members:

Course number: an integer

Course name: a string

Credit hours: integer

Letter grade: a char

Once the two classes are defined, implement the following functions in the:

Define all getter and setter functions for all member variables in the Course and Student classes

Accessors and mutators may be inline, all other functions must be in an implementation file.

Define constructors and destructors (be certain to free the dynamically allocated array of courses)

Define the following member functions in the Student class.

Define the member function readStudent()

It should not have parameters

It should prompt the user for the students info and update relevant member variables

Define the member function readCourseArray()

Use the students number of courses to set up (dynamically allocate) an array.

Prompts the user for information about each course the student has taken: the course name, the course number, the credit hours, and the students letter grade.

Define the member function computeGPA()

Should not return a value

Should not print anything

Go through the array and compute the students GPA. Heres how to calculate the GPA:Calculate the points for each course by multiplying the credit hour for that course by the point grade for the course.

A letter grade can be converted to point grade. A point grade is the numerical value for a letter grade. A is 4, B is 3, C is 2, D is 1, F is 0.

GPA is (total of all points)/(total of all credit hours)

For example, suppose a student had these grades:

A in a 3-hour course

B in a 3-hour course

A in a 2-hour course

The GPA for this student would be calculated like this:

((A * 3) + (B * 3) + (A * 2) ) / (3 + 3 + 2) =

convert the letter grades to point grades:

((4 * 3) + (3 * 3) + (4 * 2) ) / (3 + 3 + 2) =

and do math:

(12 + 9 + 8) / (3 + 3 + 2) = 29 / 8 = 3.625 GPA

Define the member function printSummary()

Does not return a value

Does all report printing

Print the information about the student and each course the student has taken.

When printing the grade for a course, print both letter grade and the point value. For example, if the student got an A in the course, print that the grade was an A and its point value was 4

The output should be lined up in nice columns.

In main()

Instantiate a Student object

Use readStudent() to get info about a student

Use readCourseArray() to get info about the courses a student has taken.

Use computeGPA() to compute the students gpa

Output the result with printSummary()

Other than the APSU GPA tool message and the Computing done message, Main should not print anything, or compute anything. It should just declare variables and use your function.

Additional requirements

Do not use any global variables.

You are competing against other software firms for this contract. Add your name, title, and phone number so that the evaluators can contact you for any further questions.

Sample Run

Your output should be similar to the following. Things in bold are typed by the user.

--- APSUs GPA Tool ---

Enter student A-number: A00000123

Enter student first name: Arthur

Enter student last name: Dent

Enter student number of courses: 3

Enter class 1 number: 1010

Enter class 1 number: Intro to Programming

Enter class 1 hours: 3

Enter class 1 grade: A

Enter class 2 number: 2010

Enter class 2 number: More Programming

Enter class 2 hours: 3

Enter class 2 grade: B

Enter class 3 number: 3333

Enter class 3 number: Programming Project

Enter class 3 hours: 2

Enter class 4 grade: A

Computing...........DONE!!!

---------------------------------

GRADE REPORT

STUDENT

A-NUMBER NAME NUM COURSES GPA

A00000123 Arthur Dent 3 3.625

COURSES

NUMBER NAME HOURS GRADE POINTS

1010 Intro to Programming 3 A 4

2010 More Programming 3 B 3

3333 Programming Project 2 A 4

END GRADE REPORT

---------------------------------

For additional software development services, contact

Pat Stack, CEO, Awesome Software, LLC

123-123-1234

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions