Question: Complete the following tasks: a. Design a class named StockTransaction that holds a stock symbol (typically one to four characters), stock name, and price per

Complete the following tasks:

a. Design a class named StockTransaction that holds a stock symbol (typically one to four characters), stock name, and price per share. Include methods to set and get the values for each data field. Create the class diagram and write the pseudocode that defines the class.

b. Design an application that declares two StockTransaction objects and sets and displays their values.

c. Design an application that declares an array of 15 StockTransactions. Prompt the user for data for each of the objects, and then display all the values.

d. Design an application that declares an array of 15 StockTransaction objects. Prompt the user for data for each object, and then pass the array to a method that determines and displays the two stocks with the highest and lowest price per share.

Step by Step Solution

3.35 Rating (176 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Diagram StockTransaction stockSymbol string stockName string pricePerShare num setStockSymbolsymbol string void setStockNamename string void setPricePerShareprice num void getStockSymbol string getS... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Logic & Design Questions!