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
- NUTR3000 Critical Review and Recommendations for Practice Assignment: Nutrition & Exercise Assignment, Malaysia
- BBM104: Principles of Marketing Case Study, UT, Malaysia Once a major tourist attraction, the zoo appears to be back on its feet after the pandemic but is still in need of a revamp
- Managerial Economic Assignment, UNMC, Malaysia What is the maximum amount you would pay for an asset that generates an income of $150,000 at the end of each
- Facility Management Assignment, OUM, Malaysia Green retrofitting is acknowledged as an essential strategy for achieving long-term sustainability in the built environment
- HRM3183: Network Solutions, Inc. is a worldwide leader in hardware, software, and services essential to computer networking: Performance Management Case Study, UPTM, Malaysia
- European Union Course Work, UM, Malaysia Italy has just passed an important piece of legislation designed to promote trade opportunities for Italian companies
- Risk and Hazard Management Assignment, MMU, Malaysia you are to demonstrate on how these aspects are managed properly
- Financial Management Assignment, UniKL, Malaysia Mr.Shahrul Affendy had been appointed to lead the finance team of Extreme Broadband Corporation
- Quality management Report, UKM, Malaysia Discuss the steps to implement quality improvements in a manufacturing company
- Biology Assignment, MMU, Malaysia Monkeypox virus is an enveloped, double-stranded, deoxyribonucleic acid zoonotic orthopoxvirus in the Poxviridae