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
- GACT5113: Managerial Accounting Assignment, UTAR, Malaysia Due to rising labour costs in Malaysia, Domain Computer, based in Singapore, is considering shifting part of its production facilities
- BMFM31115: Financial management Assignment, AIMST University, Malaysia: Interpret standard financial metrics and valuations in order to effectively communicate sound and ethical financial decisions
- Project Management Assignment, LUC, Malaysia Construction is one of the important industries which contributes to the economic growth in Malaysia
- GEO ENGINEERING Essay, UITM, Malaysia Evaluate the role of Ocean fertilization in addressing climate change In the introduction briefly explain climate change and ocean fertilization
- FIN30014: Financial Risk Management Case Study, SUT, Malaysia Russia’s failure to pay a slice of interest on one of its bonds will trigger $2.5bn of insurance-like contracts used to protect against
- Positioning a brand effectively depends on aspects including the industry: Marketing Management, Essay, OUM, Malaysia
- FBWFF1013: Fundamentals of Finance Case Study, UUM, Malaysia Taking into consideration the fact that the $98,000 home price will grow at 4% per year, what will be the future median home selling price
- 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
- Technology and Multimedia Design Case Study, TU, Malaysia Your multimedia company is hired by the Ministry of Education Malaysia (MOE) to produce educational applications
- BDEK2203: Introductory Macroeconomics Assignment, OUM, Malaysia Illustrate and explain the Gross Domestic Product (GDP) and unemployment for Malaysia for the years 2018-2021 using graphs