Answered step by step
Verified Expert Solution
Question
1 Approved Answer
b) Write a complete dass definition for onlineClass that includes the following methods: 1) A normal constructor II) A mutator method to initialize its additional
b) Write a complete dass definition for onlineClass that includes the following methods: 1) A normal constructor II) A mutator method to initialize its additional data member. 11) An accessor method. iv) An overriding printer method named toString() that displays information of online class. v) Processor method named calculate Fee () that returns the price after discount. The fee is calculated based on the following table: Discount rate (%) Program Code Undergraduate Postgraduate COMP 40 30 ENG 35 25 "Basic fee for undergraduate and postgraduate are RM1600 and RM2100 respectively. (10 marks) c) Write the main program to perform the following tasks: 1) Create an array of ONE HUNDRED (100) onlineClass objects named online. 1) Input and store all information about students into the array. iii) Update program code from ENG to COMP for student ID "2017111222". iv) Calculate and display the total fee collected from engineering program for undergraduate students. v) Display the program code enrolled by a student named "Alexander". (10 marks) b) Write a complete dass definition for onlineClass that includes the following methods: 1) A normal constructor II) A mutator method to initialize its additional data member. 11) An accessor method. iv) An overriding printer method named toString() that displays information of online class. v) Processor method named calculate Fee () that returns the price after discount. The fee is calculated based on the following table: Discount rate (%) Program Code Undergraduate Postgraduate COMP 40 30 ENG 35 25 "Basic fee for undergraduate and postgraduate are RM1600 and RM2100 respectively. (10 marks) c) Write the main program to perform the following tasks: 1) Create an array of ONE HUNDRED (100) onlineClass objects named online. 1) Input and store all information about students into the array. iii) Update program code from ENG to COMP for student ID "2017111222". iv) Calculate and display the total fee collected from engineering program for undergraduate students. v) Display the program code enrolled by a student named "Alexander". (10 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started