Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assume that the pseudocode below for each question is a separate working program in your organization and that it needs modifications as described in the
Assume that the pseudocode below for each question is a separate working program in your organization and that it needs modifications as described in the comments (lines that begin with two slashes) at the beginning of the code. Alter the pseudocode to meet the new specifications as noted above.
1. I I MAINTENANCE 11 I/ This program accepts product data about 100 products. / It displays data about the most expensive product f/ and the average price of all products. /f Modify the program to use a Product class to // hold product data. Include a constructor 1/ that accepts all the data fields as parameters. class Product Declarations private string idNum private string description private num price public Product (string id, string descrip, num pr) id = idwum description = descrip price =pr return public void setIdNum (string id) idNum = id return public void setDescription (string des) description = desc return public void setPrice (num pr) if pr highestPrice highestPrice = products [x]. getPrice () highestDesc = products [x]. getHighest () highestId = products [ ]. getIdNum () endifStep 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