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
- SBSF1103: Thinking Skill Essay, OUM, Malaysia A team of five persons is responsible for negotiating the prices of cables that suppliers provide to your company
- FIT2004: Algorithms and data structures Assignment, MUM, Malaysia you need to create a program the user can enter a word, reverse the word and check if the word is a palindrome word using a linked list
- Managing Accounting Assignment, UiTM, Malaysia Carefeel, a manufacturing company uses a job-costing system. The company plant has a machining department
- BDDN4103:The purpose of this assignment is to develop learners’ ability to identify root causes of problem(s) in an organisation: Introductory Business Decision Making, Assignment, OUM, Malaysia
- Economics Assignment, UON, Malaysia Analyze current economic news using one or more of the macroeconomic frameworks presented in the course
- Identify a conflict on the theme of change that is explored in the novel and argue: Malaysian Popular Literature and Culture Assignment, UNM, Malaysia
- Cash Budgeting Strategies Impact on a Business Thesis, WU, Malaysia What is cash budgeting and why it is important to a business or What kind of cash budgeting strategies may be adopted in a business
- Psychology Assignment, APU, Malaysia The Gestaltists emphasized the importance of figure-ground segregation in perceptual organization
- MPU3223/03: Decision Making Skills Assignment, WOU, Malaysia What are the challenges that you face when making decisions at the workplace
- Business Research Methods Research Paper, TU, Malaysia Patient satisfaction seems to be one of the most important aspects of the healthcare industry as it positively impacts