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
- MPU3233 Assignment 3: Design Thinking Implementation: Prototyping, Testing
- BBPM2103: Marketing Management I Assignment, OUM, Malaysia Explain the elements of the existing marketing mix and discuss how these elements are practiced in the selected firm
- COMMERCIAL LAW Assignment, UM, Malaysia Danial Has been working in Kota Bharu for 5 years and has purchased a house there
- BNNS6433: Urinary calculi may remain within the renal parenchyma or renal collecting system: Genitourinary & Endocrine Nursing Assignment, LUC, Malaysia
- SIQ3004: Mathematics of Financial Derivatives Assignment, UM, Malaysia Discuss the moneyness of your call and put warrants based on the latest date of your data. If your call and put warrants
- Entrepreneurship and Innovation Assignment, SU, Malaysia Many organizations faced challenges during the COVID-19 pandemic, and some found ways to overcome them but some failed
- STIW3054: Real-time Programming Assignment, UUM, Malaysia You are required to develop a small system using MAVEN and Java programming language
- Research Methodology Assignment, UiTM, Malaysia The unprecedented global event of coronavirus disease (COVID-19) struck in 2020, creating the worst downturn in Malaysian
- Marketing Innovation Assignment, HWU, Malaysia Discuss the application of the BCG Model on the current business product. Explain the basic requirements
- BBGO4103 Organisational Behaviour Report, OUM, Malaysia Workforce concerns have been a hot topic of discussion in Malaysia’s many industries