Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

programming 2 (C++) PLEASE ANSWER IT CLEARLY! with the input/output A student has a name and he/she is in a year of study (level). Each

programming 2 (C++)
PLEASE ANSWER IT CLEARLY!
with the input/output
image text in transcribed
A student has a name and he/she is in a year of study (level). Each year the student takes a number of courses and score marks for those courses and ends with a GPA for that year. The CGPA for courses of all years is calculated too. The weight of a mark between 0 and 60 is 0 , the weight of a mark between 60 and 70 is 1, the weight of a mark between 70 and 80 is 2, the weight of a mark between 80 and 90 is 3 , and the weight of a mark between 90 and 100 is 4 . Assuming that w stands for the weight of the mark and c stands for the course credit's then the GPA is calculated using the following formula: GPA=ciwtct Define a struct called Year with components numberOfCourses, an array marks[ ], an array credits [] all of type int, and GPA of type float. Define a class called Student with private data members name of type string, level of type int, CGPA of type float, an array study Year [ ] of type Year. The class also has the private member functions calculateGPA(int), and calculateCGPA(). The class has the public member functions ser(int), get GPA (int), get CGPAO, print 0 , a default constructor, and constructor with parameters. Note: Inforce the least privileged principle by using const to prevent member functions from changing

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

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

Students also viewed these Databases questions

Question

8. Do the organizations fringe benefits reflect diversity?

Answered: 1 week ago