SeatTest - SoldA = scanner.nextInt();...

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

View Full Document Right Arrow Icon
import javax.swing.*; import java.util.*; import java.text.*; public class SeatTest { public static void main(String[] args){ Seat A, B, C; Double priceA, priceB, priceC; int SoldA, SoldB, SoldC; Scanner scanner; A = new Seat("Type A"); B = new Seat("Type B"); C = new Seat("Type C"); A.setName("A"); B.setName("B"); C.setName("C"); scanner = new Scanner(System.in); System.out.println("What was the price of Ticket A : "); priceA = scanner.nextDouble(); System.out.println("How many ticket A's were sold? ");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: SoldA = scanner.nextInt(); System.out.println("What was the price of Ticket B : "); priceB = scanner.nextDouble(); System.out.println("How many ticket B's were sold? "); SoldB = scanner.nextInt(); System.out.println("What was the price of Ticket C : "); priceC = scanner.nextDouble(); System.out.println("How many ticket C's were sold? "); SoldC = scanner.nextInt(); System.out.println("The total Sales were : " + ((SoldA * priceA)+(SoldB * priceB)+ (SoldC * priceC))); }}...
View Full Document

Ask a homework question - tutors are online