Question: 7. The following program is written to get a software details from the user. Write a code to complete the program based on the instructions
7. The following program is written to get a software details from the user. Write a code to complete the program based on the instructions given. #include
s.display(); } Sample Output A list of computer software. Enter software name :Microsoft Word Enter software quantity :4 Enter software ID :112211 Enter software price :345.00 Software Name :Microsoft Word Software Quantity :4 Software ID :112211 Software Price :RM 345 Total :RM 1380 -------------------------------- i. Write a function called setdata() that has four parameters and initialize the parameters to name, id, qtty and price. ii. Write a function called calculate_total() that calculate the total price. iii. Write a function called display() that display all information as shown in the sample output. iv. Write a constructor for class software that displays a welcome note A list of computer software.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
