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
- BBMF 3073: Risk Management Assignment, UTAR, Malaysia Risk Management analysis is the discipline of identifying business risk and determining solutions to business risk
- TBE101/03: Building Materials Report, WOU, Malaysia Metals are commonly employed in the building and construction industry due to their inherent qualities
- BNNS6384: Bachelor of Nursing Sciences Assignment, LUC, Malaysia Polycystic ovarian syndrome (PCOS) is a common endocrinal problem that affects females of reproductive age
- Company Law Assignment, BAC, Malaysia CLOUD-ASSISTED cyber-physical systems have broad applications, ranging from healthcare to smart electricity grid
- Fundamental Concepts of ICT Assignment, APU, Malaysia Information Technology becomes one of the greatest phenomena that ever exist in the world today
- BTW1042: Malaysian business law Assignment, MUM, Malaysia Discuss whether the elements required to form a legally binding contract exist between Ben and Tim
- MGT3443: Determine the transportation mode throughout the supply chain of the organization: Transportation Management Assignment, UPTM, Malaysia
- Business Law Assignment, UCSI, Malaysia Discuss the relationship between Company Law and Consumer Protection Law in Malaysia
- ECW1101: Introductory Microeconomics Essay, MUM, Malaysia Explain why the world price of palm oil increases as the result of the impact of Russia-Ukraine conflict
- Prevention and Detection of Corruption and Procurement Fraud Assignment, LBS, Malaysia You have been hired as a Fraud examiner by Polaris Co to investigate Financial statement fraud in their organization