Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Stock.java program TradeStock.java program Please make sure it works. Thank you. ISTE-120 Lab 07: Decisions Exercise 1-Validating Stock Information (4 points) Must be completed during

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Stock.java program
image text in transcribed
image text in transcribed
image text in transcribed
TradeStock.java program
image text in transcribed
image text in transcribed
Please make sure it works. Thank you.
ISTE-120 Lab 07: Decisions Exercise 1-Validating Stock Information (4 points) Must be completed during the lab period. 1. Download the file Labo7Starter.zip from myCourses and unzip to obtain two files named Stock.java and TradeStock.java. The class named Stock with the following attributes and methods: AttributeDescription Name of stock as type String name symbol-l symbolfor tock on appropriatestockexchange astype tr ng price Price of one share as type double shares Number of shares as type int Description Name Parameters / Return Stock Two parameters. First parameter is name Constructor to create a of stock. Second parameter is symbol for Stock object stock. No return type. getName No parameters. Returns name of stock as Accessor for name getSymbol No parameters. Returns symbol of stock Accessor for symbol getPrice No parameters. Returns price of stock as Accessor for price attribute. getShares No parameters. Returns number of setPrice One parameter with new price of stock as Mutator for price attribute. setShares One parameter with new number of attribute type String as type String. type double. shares as type int type double. No return value. shares as type int. No return value. attribute Accessor for shares attribute Mutator for shares attribute. The class Tradestock allows the user to enter the information for a stock, set the values, and then print them. Run the program a few times to understand how it works. 2. ISTE-120 Page 1 of9 LAB 07 ISTE-120 Lab 07: Decisions Exercise 1-Validating Stock Information (4 points) Must be completed during the lab period. 1. Download the file Labo7Starter.zip from myCourses and unzip to obtain two files named Stock.java and TradeStock.java. The class named Stock with the following attributes and methods: AttributeDescription Name of stock as type String name symbol-l symbolfor tock on appropriatestockexchange astype tr ng price Price of one share as type double shares Number of shares as type int Description Name Parameters / Return Stock Two parameters. First parameter is name Constructor to create a of stock. Second parameter is symbol for Stock object stock. No return type. getName No parameters. Returns name of stock as Accessor for name getSymbol No parameters. Returns symbol of stock Accessor for symbol getPrice No parameters. Returns price of stock as Accessor for price attribute. getShares No parameters. Returns number of setPrice One parameter with new price of stock as Mutator for price attribute. setShares One parameter with new number of attribute type String as type String. type double. shares as type int type double. No return value. shares as type int. No return value. attribute Accessor for shares attribute Mutator for shares attribute. The class Tradestock allows the user to enter the information for a stock, set the values, and then print them. Run the program a few times to understand how it works. 2. ISTE-120 Page 1 of9 LAB 07

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

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions

Question

=+j Describe how EU directives impact IHRM.

Answered: 1 week ago