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
- Advanced Environmental Impact Essay, UU, Malaysia Malaysia is a developing country. Rapid development, deforestation, destroy of mountains and many other activities
- MGT7998E: The Relationship in Between Service Quality Dimensions and Patient Satisfaction of Public Hospital in Malaysia: RESEARCH Assignment, IIU, Malaysia
- TCP3151: Integrative Programming and Technologies Assignment, MMU, Malaysia Java’s main function invokes the first and second native methods and displays the ‘content of the sorted array
- Video games have always been regarded as an enjoyable pastime and a sensational topic amongst teens and young adults: Art & Aesthetics in Video Games and How it Impacts the Player: Design Research, UOW, Malaysia
- BUSN6120: Managerial Economics Assignment Malaysia Given a linear demand function of the form qxd = 500 – 2px – 3py + 0.01m, find the inverse linear demand function assuming m = 20,000 and py = 10
- ENT300: Fundamentals of Entrepreneurship Report, UiTM, Malaysia On 1st November, my friend and I decided to start a business that focuses on gadget consulting services
- GSGM7223 Organisational Development and Change Management Assignment, Malaysia
- This is a group assignment and must be completed in a group of a maximum of 4 students: object oriented development Assignment, APU, Malaysia
- You are required to write a case study report with regards to issues pertaining to organizational development: Organizational Development and Change Management Case study, UIU, Malaysia
- HPGD3103 Instructional Technology Assignment: ASSURE Model-Based Lesson Design in Google Classroom