practice - Stock test = new Stock(input.nextLine S Date d =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import type.lib.Stock; import java.util.Scanner; import; import java.util.Date; i public class practice { public static void main(String[] args) { PrintStream output = System.out; Scanner input = new Scanner(; S output.println("Enter a stock symbol");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Stock test = new Stock(input.nextLine()); S Date d = new Date(); D output.printf("As of %s, the price of a %n", d.toString()); output.println(test.getName()); output.printf("share is: %.2f%n", test.getPrice()); } }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online