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
- Law Assignment, OUM, Malaysia: During the classroom presentation, you were introduced to a number of examples of businesses ideas
- Research Methods Thesis, UMS, Malaysia The dependent variable of this study is Customer satisfaction in the Johor Bahru property industry, which is the primary interest of the study
- ABCC1103: Reflect on a significant moment in your life that notably influenced your identity: Introduction To Communication, Assignment, OUM, Malaysia
- BNNS6433: The infection typically starts in the lower urinary tract as a urinary tract infection (UTI): Genitourinary & Endocrine Nursing Assignment, LUC, Malaysia
- ECO7101E: Business Economics Assignment, UOP, Malaysia Discuss the macroeconomic statistics of the country. In your opinion, how did the pandemic of COVID-19
- HPGD1103: What impact do you think new technologies are having on the way curricula are developed and delivered?: Curriculum Development Assignment, Malaysia
- TEE103: i. Calculate the voltage Vs, by using Kirchhoff’s law and Ohm’s.: Circuit Theory I Assignment, WOU, Malaysia
- HRM3183: Analyse the process and general consideration of performance management system in an organisation: PERFORMANCE MANAGEMENT Case Study, UPTM, Malaysia
- Discuss whether Mewah Corporation is doing well with regard to strategic staffing: Strategic, HR Planning, Selection and Recruitment Assignment, OUM, Malaysia
- MBSA1623: Leading talent in organization Assignment, UITM, Malaysia Choose one of the topics in Talent Management in a chosen industry and Identify the key problem in the topic