Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribedimage text in transcribed

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 () endif

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions