Design a class of student that has the attributesmiddot


(1) Design a class of Student that has the following attributes:

· Data members: name, Mathematics score and Chemistry score.

· Function members:

(1) A default constructor of no-argument, and another constructor that accepts actual arguments.

(2) One get method that returns the name.

(3) AcompAveScore() function that computes and returns the average score. average score = (Mathematics score + Chemistry score)/2.0

(2) In themain function, test theStudent class as follows:

· Declare an array of three elements.

· Create threeStudent objects: a("Bob",60,70), b("John",70,80)andc("Janet",80,90).

· Assign three objects to the array.

· Loop through all objects, print out their names and average scores (callcompAveScore()) such as:

Bob 65

John 75

Janet 85

Solution Preview :

Prepared by a verified Expert
Database Management System: Design a class of student that has the attributesmiddot
Reference No:- TGS01186805

Now Priced at $10 (50% Discount)

Recommended (93%)

Rated (4.5/5)