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
- Entrepreneurship Essay, MSU, Malaysia If you had to advise an entrepreneur who is considering entering this country to sell his product, what would you say about strategic issues
- Fundamental Concepts of ICT Assignment, APU, Malaysia Information Technology becomes one of the greatest phenomena that ever exist in the world today
- BNNS 6443 Mental Health Nursing Individual Assignment Essay | LUC Malaysia
- MMP706: Project Management Assignment, AeU, Malaysia You are the project manager for your company’s MCP project. You are collaborating with your project team and business
- Issues In Global Business Assignment, MUM, Malaysia Multinational corporations are increasing major risks multinational corporations face opportunities but pose
- DECON203 Business Economics Individual Assignment Brief Semester-03 September 2025 to January 2026
- ATF20603 BUSINESS ACCOUNTING Financial Records and Performance Analysis
- IT Equipment Room Inventory System Report, UUM, Malaysia The vision to manufacture great tires began in August 1945, when the founding president, Mr. Rikimatsu Tomihisa
- Manufacturing Process Assignment, UTM, Malaysia Compare and contrast the use of welding and mechanical joining processes in the manufacture of a steel table
- LAW1014: Business Law Course Work, SU, Malaysia Discuss the application of the doctrine of caveat emptor with particular reference to the implied conditions