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
- Portfolio and Risk Management Report, APU, Malaysia You are expected to read beyond textbooks and able to apply the knowledge gain from real life examples either from your working environment
- Advanced Financial Management Assignment, UUM, Malaysia Show an excellent description and discussion of issues and material with evidence of critical evaluation of issues and material
- FAR620: Consolidated Financial Statements Assignment, UiTM, Malaysia Glov Bhd is a publicly listed company in the healthcare sector. It manufactures and sells high-quality gloves which fulfill demand
- BBF305/03: Investment and Portfolio Management Case Study, WOU, Malaysia You are in a senior management position in a leading international funds management firm
- Business Communication Essay, UiTM, Malaysia Formal and informal communication are rather distinct types of modern workplace communication
- Strategic Operation Management Assignment, HWU, Malaysia BP’s operations management and analyze the issues to determine the core problem that led to the Deepwater Horizon Disaster
- BQS560: Project Management I Assignment, UiTM, Malaysia Understanding and synthesizing information gained from the main source of reference. Critically appraise the information
- BMG302/03: The Johari Window is a model that helps individuals understand their relationships with themselves: Organizational Behavior Assignment, WOU, Malaysia
- SKMM2413: Thermodynamics Assignment, UMT, Malaysia Choose a value for the polytropic exponent between 1.2-1.6. Using Microsoft Excel, construct the process
- LAW034: Introduction to Legal Theories Assignment, UiTM, Malaysia Delima is a single mother who supports her three children and is a sick mother. She is uneducated but nevertheless managed