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
- International Business Issues and Polices Assignment, APU, Malaysia Poverty is considered one of the major hindrances to the economic development in the least developed countries
- Managerial Account Course Work, UPM, Malaysia Slow Stool Company Is debating the use of direct labor cost or direct labor hours as the cost allocation base
- Physicochemical Characteristics of Melastoma Malabathricum Thesis, UOM, Malaysia Melastoma malabathricum or known as the duduk tree is a type of plant that comes from the Melastomaceae family
- MPU2163: Pengajian Malaysia Essay, IIU, Malaysia Mencapai keputusan yang cemerlang dalam pelajaran adalah pencapaian yang diidam-idamkan oleh semua yang bergelar pelajar
- Business Analytics Research Paper, SU, Malaysia This project is proposed to solve the business problem from a business/firm/company perspective
- Information Marketing Assignment, TU, Malaysia An info product is any product that can be digitally created, sold, and transferred to your customer
- Business Law Assignment, UCSI, Malaysia Discuss the relationship between Company Law and Consumer Protection Law in Malaysia
- BPA31803 Project Management Assignment Malaysia
- PSYC2505: Foundations of Psychology and Sociology For Health Assignment, UON, Malaysia As a student, you are expected to have good communication and interpersonal skills
- MPHR7113 Assignment 1: Marketing Management IKEA Malaysia Retention Strategy – City University Malaysia