Create a parent class called Student that has the following variables and methods

A protected string that holds the name of the student

A protected integer that holds the age of the student

A constructor that sets the a the name and age variables.

Create a derived class that called [Your First Name] that has a public inheritance from the Student class. It has the following variable and method

A private variable that holds the GPA of [Your first name]

A constructor that passes the name and age to the parent constructor. It also takes input to set the GPA variable.

A public method that prints the name, age, and GPA

In the main function

Create an instance of [Your First Name] and pass “Firstname Lastname” (name), 25 (age), and 3.5 (GPA) to the constructor.

Use the appropriate method to the print out the name, age, and GPA.

"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Looking for a Similar Assignment? Our Experts can help. Use the coupon code SAVE30 to get your first order at 30% off!

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp