Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please refer to the photo CSCE1101 Programming Fundamentals Assignment 2-Classes Note: Unless explicty stated, you shouldnt validate the input or output any prompt messages ike

image text in transcribedimage text in transcribed

please refer to the photo

CSCE1101 Programming Fundamentals Assignment 2-Classes Note: Unless explicty stated, you shouldnt validate the input or output any prompt messages ike Please Ener","The Result "or stuf lke that. You should only on the stated nguts and cout stated outputs as assignment are graded automaticaly by brying different inputs and comparing your output with ne expected output You should also use instead of cin to inout a s s in between Problem 11100 Design a class AlUC student hat would have at least the folowing private fields name: sing ID constant string GPA Boat courseGrades:2d dynamic array of float Note that the courseGrades aray size is (2 x numberOtCourses) and is arranged as follows The first row represents the students grade in a course (0 to 4 2 The second row represents the credit hours of each cormesponding course Example 20 30 3.0 20 20 2.0 3.0 GPA is calculated as follows (4.030 2020 3020 4.0-20 00-3012 (ocal hours) 25 All the variables except for GPA should have their setters and getters, and the class should have 3 constructors that do the following: Receive nothing and intalizes name to John Doe, numberOrCourses, GPA and courseGrades to Receive name only and initializes GPA, IO, numberOMCourses, and courseGrades as the first Receive name and ID and initalzes GPA, numberOCourses, and courseGrades as the first constructor zeros, and ID to "000 constructor courseGrades: 2d dynamic array of float Note that the courseGrades array size is (2 x numberOfCourses) and is arranged as follows: 1. The first row represents the students grade in a course (0 to 4) 2. The second row represents the credit hours of each corresponding course Example 4.0 2.0 3.0 4.0 0.0 3.0 2.0 2.0 2.0 3.0 GPA is calculated as follows (4.0*3.0 + 2.0*2.0+3.0*2.0+4.0*2.0+0.0*3.0)/12 (total hours)2.5 All the variables except for GPA should have their setters and getters, and the class should have 3 constructors that do the following - Receive nothing and initializes name to "John Doe", numberOfCourses, GPA and courseGrades to zeros, and ID to "000" - Receive name only and initializes GPA, ID, numberOfCourses, and courseGrades as the first constructor - Receive name and ID and initializes GPA, numberOfCourses, and courseGrades as the first constructor It should have the following methods (In addition to the setters and getters) Note that all the getters should be written as constant functions

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_2

Step: 3

blur-text-image_3

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 Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions

Question

How is the NDAA used to shape defense policies indirectly?

Answered: 1 week ago