Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Stock {
- String symbol;
- String name;
- double previousClosingPrice;
- double currentPrice;
- int ID;
- Stock(String s, String n, int i) {
- symbol = s;
- name = n;
- ID = i;
- }
- double getChangePercent() {
- return ((currentPrice - previousClosingPrice) / previousClosingPrice) * 100;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment