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
- Choose a company you work for or any company of your liking or a specific product: Sustainability and Business, Assignment, MUM, Malaysia
- BMG307/03 Global Business Strategy Assignment: International Structure, Market Entry & Strategic Alliance Risk Analysis
- Advanced process integration Assignment, CU, Malaysia Determine the minimum fresh water and minimum wastewater targets for the above system using water cascade analysis
- Fick’s Second Law of Diffusion has long been employed to describe in vitro percutaneous permeation experiments: Numerical solution in percutanous drug absorption Thesis, USM, Malaysia
- EED10303 ENGLISH TEACHING METHOD : Effective Teaching Methods for Generation Z
- MGT340: Human Resource Management Dissertation, UUM, Malaysia Human resources have played an important role in the success of the company. The quality of the human resource
- The task is to evaluate organizations’ financial reporting with an emphasis on the MFRS used: Financial Accounting and Reporting Assignment, UiTM, Malaysia
- CL101: Criminal Law Course Work, BAC, Malaysia Mr. M aged 65, with colon cancer, had a colectomy surgery. An Assessment finding shows he appears depressed
- Pharmacy Practice Assignment, USM, Malaysia Prevalence and risk factors of metabolic syndrome among Malaysians, impact of educational interventions on the knowledge of the risk factors
- Innovation management and new product development Assignment, APU, Malaysia Discuss the growth strategies in Ansoff s Matrix that can be opted to Influence the growth of the newly developed product