Object Oriented Programming Assignment, UKM, Malaysia A student class has the following properties: Data Member Sample Data ID 2345, 4001 scores 56, 87, 0, 70 grade ‘A’, ‘B’. Methods public int getId()
| University | Universiti Kebangsaan Malaysia (UKM) |
| Subject | Object Oriented Programming |
QUESTION 1
A student class has the following properties: Data Member Sample Data ID 2345, 4001 scores 56, 87, 0, 70 grade ‘A’, ‘B’. Methods public int getId() return the id of student. The default id of the student is 0. public int getScore() return score of a student. The default score is 0. public void setId(int id) set the id of the student. public void setScore(int sc) set the score of a student. public void set grade(char G) set the grade of a student. public char check grade() check the grade based on the score table below Score Grade 76-100 A 60-75 B 45-59 C 35-44 D 20-34 E 0-19 F
1) Write a class definition for the Student class.
2) Write an application :
a) Write a statement to declare and create an object for a student
b) Input all the information.
c) Count the number of students who get E and F and store them in the variable numFail.
d) Loop the process using sentinel controlled loop e) Display numFail.
Recent Solved Questions
- Write a business plan relevant for your country with the following initial parameters: Capstone Project Assignment, Malaysia
- Ethics and professional issues in Counselling and Psychology Case Study, MUM, Malaysia Joe is a 15-year-old, who has been referred to see the school counsellor by his teacher
- Legislation Assignment, OUM, Malaysia What is the Factory and Machine Act 1967? Why was the promulgation of this Act necessary? Who is the enforcement authority
- Software Engineering Dissertation, UTM, Malaysia Test Case Prioritization Using Swarm Intelligence Algorithm To Improve Fault Coverage And Time For Web Applications
- Guidance and Counselling Essay, MSU, Malaysia Prepare an essay regarding behaviourist counselling as one of the prominent techniques in counselling
- CSEB2113: Programming 1 Assignment, TNU, Malaysia Write C++ statements to perform the following tasks: Declare a variable name my Class of type integer in an array form with size 20
- To examine the teachers’ perceptions of the school principal’s leadership qualities: Sustainability and Business, Assignment, MUM, Malaysia
- Factors Influencing Perceived Stress and Its Impact Towards Food Consumption Behaviour During The Pandemic Assignment, MSU, Malaysia Coronaviruses are a group of viruses adapted from the family of Coronavidae that has caused a change in the lives
- TCC238: Structured Programming Course Work, WOU, Malaysia C program comprises all codes needed for the compilation and execution of a runnable system
- Discuss one of the emotion theories in psychology which exist and how nurses experience: Psychology and sociology for nurses Assignment, OUM, Malaysia