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.
Get Solution of this Assessment. Hire Experts to solve this assignment for you Before Deadline.
Recent Solved Questions
- Professional Management and Leadership Assignment, OUM, Malaysia You need to draw on leadership and management theories to demonstrate understanding and application of the module content of “Management, Leadership, Vision/Mission/Strategy
- ECO162: Microeconomic Assignment, UITM, Malaysia Students are required to find out pertinent current issues through newspaper articles, published journals, academic magazines et cetera
- FIT1048: Fundamentals of C++ Assignment, MUM, Malaysia You are asked to write a set of C++ classes that simulate the operation of an airline
- Java Programming Assignment, UniKL, Malaysia The application shall display all the GUI components as illustrated in the figure. Users need to enter details
- MPU2163: Pengajian Malaysia Essay, IIU, Malaysia Mencapai keputusan yang cemerlang dalam pelajaran adalah pencapaian yang diidam-idamkan oleh semua yang bergelar pelajar
- Python Assignment, LUC, Malaysia I wanted to automate the post with the text I provided in the code. I’ve tried a number of different approaches
- MSM606: Strategic Management Essay, AeU, Malaysia Acquire relevant knowledge on factors related to and that had impacts on how business organizations function
- MLL207e: Comparative Study of Bahasa Melayu and Bahasa Indonesia Assignment, SUSS, Malaysia Huraikan secara kritis sejarah perkembangan Bahasa Indonesia dan Bahasa Melayu dalam kurun ke-20
- Mechanics of Materials Assignment, MUM, Malaysia The built-up shaft consists of a pipe AB and solid rod BC. The pipe has an inner radius of 10 mm and an outer radius of 14 mm
- Performance Management Assignment, UON, Malaysia Performance Management Practices in Malaysia Conglomerate What do you think & comment on