Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Exercise#3: Repeat exercise 2 here, but read the input from a file instead from a user and print the output to a file instead
Java
Exercise#3: Repeat exercise 2 here, but read the input from a file instead from a user and print the output to a file instead of console as shown below: Input File Sample: 198 2507 4282 135000 75000 Output File Sample: No. of Balcony tickets: 198 No. of VIP tickets: 2507 No. of Basic tickets: 4282 Bills: 135000 salaries: 75000 Profit 370530 - 210000 - 160530 AED import java.util. puble class X2 public static void mattint sro anter se cannersystem int AD-1204 int VAED - 70 int BAD - int T_A_OF_ int T_A_OF_VIP int T OF System.out.print in the Tito BALCON") F_A_OF_-3.nextInt (): System.out.printin() Bystem.out.printlnite the Tit) T_A_OF VIP-s.extinto System.out.printin System.out.print in the case 1) F_A_OF_D - 5.nextInt () system.out.printin int Bills int Salaries System.out.printin interest Bills - S.nextInt 1) System.out.println System.out.printineraries salaries - .nextIn System.out.printin Int profiti - LED - T_A_or_*) VADF_A_OF_VIP_X_or_bBARONI int expenses - chills salaries) int Portit - Profil - expenses System.out.printint TA_OF_ dystem.out.printino V tis T_A_OF_VIP) System.out.println. tica TA_OF_ : System.out.printin System.out.printinas Bille System.out.println("Salaries) System.out.println("************* System.out.printinortit - Petit Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started