Create Company Project 5

Company Demo

/**
* Program Name: CompanyDemo.java - Driver file 
* Programming assignment 5 -- Company Stock quote
* This program connects to a web service to check the current stock information 
* for Google and Apple.  This portion is the Driver file.
*
*
* @Author: Evan Lacy
*
* @Yen-Ting (Tony) Lee
* @Professor Ching-seh (Mike) Wu
*
* @10/16/2013
*/
//Imports the Scanner class.

import java.util.Scanner;



//Main method for the company demo
public class CompanyDemo {
    public static void main(String[] args) {
        
        
        
        //Asks user with Scanner class for the stock information.
        Scanner keyboard = new Scanner(System.in);
        System.out.println("Please type in Company Name");
        String Name = keyboard.next();
        System.out.println("Please type in Company Symbol");
        String Symbol = keyboard.next();
        
        //Apple method defined
        Company1 companyApple = new Company1(Name, Symbol);
        companyApple.currentQuote();
        companyApple.printCompany();
        companyApple.readCompany();
        
        //Google method defined with apple's attributes.
        Company1 stock2 = new Company1(companyApple.getCompanyName(), companyApple.getCompanySymbol());
        stock2.currentQuote();
        stock2.printCompany();
        System.out.println(companyApple.getCompanyQuote());

    }

   
}