CompanyDriver - import java.util.Scanner public class...

This preview shows page 1 - 2 out of 2 pages.

import java.util.Scanner; public class CompanyDriver { public static void main(String[] args) { String nc1, nc2, nc3, mc1, mc2, mc3; int ec1, ec2, ec3; Scanner scan = new Scanner(System.in); // get data from user System.out.print("Enter the name of Company 1:"); nc1 = scan.nextLine(); System.out.print("Enter the manager of Company 1:"); mc1 = scan.nextLine(); System.out.print("Enter the number of employees of Company 1:"); ec1 = scan.nextInt(); scan.nextLine(); CompanyRepresenter c1 = new CompanyRepresenter(nc1, mc1, ec1); System.out.print("Enter the name of Company 2:"); nc2 = scan.nextLine(); System.out.print("Enter the manager of Company 2:"); mc2 = scan.nextLine(); System.out.print("Enter the number of employees of Company 2:"); ec2 = scan.nextInt(); scan.nextLine(); CompanyRepresenter c2 = new CompanyRepresenter(nc2, mc2, ec2); System.out.print("Enter the name of Company 3:"); nc3 = scan.nextLine(); System.out.print("Enter the manager of Company 3:"); mc3 = scan.nextLine(); System.out.print("Enter the number of employees of Company 3:"); ec3 = scan.nextInt();

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture