Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started