Question: 3 . Write a class Stock that represents a stock to be traded. For this lab, we'll focus on selling stocks but our Stock class

3. Write a class Stock that represents a stock to be traded. For this lab, we'll focus on selling stocks but our Stock class should be general enough to participate in any type of trade (buy/sell/etc.).
Our Stock class should contain:
An Constructor that takes THREE (3) parameters: the symbol, name, and cost basis (in that order) as parameters and sets an instance values appropriately.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!