forked from Denisolt/CSCI-160
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStockWatch.java
More file actions
44 lines (41 loc) · 1.43 KB
/
StockWatch.java
File metadata and controls
44 lines (41 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package StockMarket;
/****************************************************
*Project Inormaiton
*Course: CSCI 185/504 Spring 2016
*Project Name: Project #3
*File Name: Order
*Author: Denisolt Shakhbulatov
*Date Created: 03/17/2016
*Date Updated: 03/17/2016 class has been created
*Description: This class is a parent class with two other classes, has a contrusctor and interface class MarketData
*****************************************************************************************************************************************/
public class StockWatch
{
String name;
double price;
public StockWatch(String name, double price)
{
this.name = name;
this.price = price;
System.out.println("Welcome to StockWatch");
}
}
interface MarketData
{
public void data(String name, double price);
}
class Analysis extends StockWatch implements MarketData
{
public void data(String name, double price)
{
System.out.println("Analysis is working for MarketData:");
System.out.println("Stock Name: " + name +", Value: " + price);
}
public Analysis(String name, double price, double currentvalue)
{
super(name, price);
int cashflow = 75000000;
System.out.println("Analysis is working for StockWatch:");
System.out.println("Stock Name: " + name + ", Book Value: " + price + ", Current Value: " + currentvalue + ", Cashflow: " + cashflow);
}
}