Question: Q1 ) write a class Student that has the following attributes and methods stName : to represent student name stNum : to represent student Number

Q1 ) write a class Student that has the following attributes and methods stName : to represent student name stNum : to represent student Number stAge : to represent student age . Constructor to initialize the data members to any given values . Display : To print the data members . TestAge method to test if the age is greater than 20 print greater than level 2, else print less than or equal to level 2. Define object S1. Display its information . Test the level of the student
Object language program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!