Colegio de San Juan de Letran Intramuros, Manila College of Engineering and Information Technology Institute of Information Technology Activity No. 3 IIT403 - COMPUTER PROGRAMMING 2 Submitted by: Christian Paul D. Chavez IIT403 – CL7 Submitted to: Ms. Vida Makiling import java.util.Scanner; February 14, 2019 public class chavez{ public static void main(String[] args) { SCTEXstations(); Origin(); TIPO(); Origin(); DIN(); Origin(); FLOR(); Origin(); PORAC(); Origin(); CLARKS(); Origin(); MAB(); Origin(); CLARKN(); Origin(); DOLORES(); Origin(); Origin(); CONC(); Origin(); SANMIGUEL(); Origin(); TARLAC(); } public static void SCTEXstations() { System.out.println("SCTEX Toll Computation Pogram"); System.out.println("By: Christian Paul D. Chavez "); System.out.println("============ ==========\n"); //Destination System.out.println("Entry/Exits:"); System.out.println("1. TIPO(Tipo/SFEX) "); System.out.println("2. DIN(Dinalupihan) "); System.out.println("3. FLOR(Floridablanca) "); System.out.println("4. PORAC(Porac) "); System.out.println("5. CLARKS (Clark South) "); System.out.println("6. MAB(Mabalacat)"); System.out.println("7. CLARKN(Clark North) "); System.out.println("8. DOLORES(Dolores) "); System.out.println("9. CONC(Concepcion) "); System.out.println("10. SANMIGUEL(San Miguel) "); System.out.println("11. TAR(Tarlac) "); } public static void Origin() { Scanner sc = new Scanner(System.in); System.out.print("Enter the Point of Origin: "); String entrance = sc.nextLine(); switch (entrance) { } //Switch for Point of Origin } public static void TIPO() { Scanner sc = new Scanner(System.in); int pay; System.out.print("Enter Your Destination: "); String exit = sc.nextLine(); switch (exit) { case "DIN": pay = 60; System.out.println("Your Route is from Tipo/SFEX to Dinalupihan"); System.out.println("Your Total Bill is " + pay); break; case "FLOR": pay = 116; System.out.println("Your Route is from Tipo/SFEX to Floridablanca"); System.out.println("Your Total Bill is " + pay); break; case "CLARKN": pay = 205; System.out.println("Your Route is from Tipo/SFEX to Clark North"); System.out.println("Your Total Bill is " + pay); break; case "DOLORES": pay = 209; System.out.println("Your Route is from Tipo/SFEX to Dolores"); System.out.println("Your Total Bill is " + pay); break; case "PORAC": pay = 157; System.out.println("Your Route is from Tipo/SFEX to Porac"); System.out.println("Your Total Bill is " + pay); break; case "CONC": pay = 240; System.out.println("Your Route is from Tipo/SFEX to Concepcion"); System.out.println("Your Total Bill is " + pay); break; case "CLARKS": pay = 187; System.out.println("Your Route is from Tipo/SFEX to Clark South"); System.out.println("Your Total Bill is " + pay); break; case "SANMIGUEL": pay = 282; System.out.println("Your Route is from Tipo/SFEX to San Miguel"); System.out.println("Your Total Bill is " + pay); break; case "MAB": pay = 193; System.out.println("Your Route is from Tipo/SFEX to Mabalact(Mabiga)"); System.out.println("Your Total Bill is " + pay); break; case "TAR": pay = 297; System.out.println("Your Route is from Tipo/SFEX to Tarlac"); System.out.println("Your Total Bill is " + pay); break; default: System.out.println("Invalid Destination"); } } public static void DIN() { Scanner sc = new Scanner(System.in); int pay; System.out.print("Enter Your Destination: "); String exitDin = sc.nextLine(); switch (exitDin) { case "FLOR": pay = 56; System.out.println("Your Route is from Dinalupihan to Floridablanca"); System.out.println("Your Total Bill is " + pay); break; break; case "MAB": pay = 132; System.out.println("Your Route is from Dinalupihan to Mabalact(Mabiga)"); System.out.println("Your Total Bill is " + pay); break; case "CLARKN": pay = 144; System.out.println("Your Route is from Dinalupihan to Clark North"); System.out.println("Your Total Bill is " + pay); break; case "DOLORES": pay = 148; System.out.println("Your Route is from Dinalupihan to Dolores"); System.out.println("Your Total Bill is " + pay); break; case "PORAC": pay = 96; System.out.println("Your Route is from Dinalupihan to Porac"); System.out.println("Your Total Bill is " + pay); break; case "CONC": pay = 179; System.out.println("Your Route is from Dinalupihan to Concepcion"); System.out.println("Your Total Bill is " + pay); break; case "CLARKS": pay = 126; System.out.println("Your Route is from Dinalupihan to Clark South"); System.out.println("Your Total Bill is " + pay); case "SANMIGUEL": pay = 221; System.out.println("Your Route is from Dinalupihan to San Miguel"); System.out.println("Your Total Bill is " + pay); break; case "TAR": pay = 236; System.out.println("Your Route is from Dinalupihan to Tarlac"); System.out.println("Your Total Bill is " + pay); break; default: System.out.println("Invalid Destination"); } } public static void FLOR() { Scanner sc = new Scanner(System.in); int pay; System.out.print("Enter Your Destination: "); String exitFlor = sc.nextLine(); switch (exitFlor) { case "PORAC": pay = 40; System.out.println("Your Route is from Floridablanca to Porac"); System.out.println("Your Total Bill is " + pay); break; case "CLARKS": pay = 71; System.out.println("Your Route is from Floridablanca to Clark South"); System.out.println("Your Total Bill is " + pay); break; case "MAB": pay = 76; System.out.println("Your Route is from Floridablanca to Mabalact(Mabiga)"); System.out.println("Your Total Bill is " + pay); break; case "CLARKN": pay = 88; System.out.println("Your Route is from Floridablanca to Clark North"); System.out.println("Your Total Bill is " + pay); break; case "DOLORES": pay = 92; System.out.println("Your Route is from Floridablanca to Dolores"); System.out.println("Your Total Bill is " + pay); break; case "CONC": pay = 124; System.out.println("Your Route is from Floridablanca to Concepcion"); System.out.println("Your Total Bill is " + pay); break; case "SANMIGUEL": pay = 165; System.out.println("Your Route is from Floridablanca to San Miguel"); System.out.println("Your Total Bill is " + pay); break; case "TAR": pay = 180; System.out.println("Your Route is from Floridablanca to Tarlac"); System.out.println("Your Total Bill is " + pay); break; default: System.out.println("Invalid Destination"); } } public static void PORAC() { Scanner sc = new Scanner(System.in); int pay; System.out.print("Enter Your Destination: "); String exitPorac = sc.nextLine(); switch (exitPorac) { case "CLARKS": pay = 30; System.out.println("Your Route is from Porac to Clark South"); System.out.println("Your Total Bill is " + pay); break; case "MAB": pay = 35; System.out.println("Your Route is from Porac to Mabalact(Mabiga)"); System.out.println("Your Total Bill is " + pay); break; case "CLARKN": pay = 48; System.out.println("Your Route is from Porac to Clark North"); System.out.println("Your Total Bill is " + pay); break; case "DOLORES": pay = 52; System.out.println("Your Route is from Porac to Dolores"); System.out.println("Your Total Bill is " + pay); break; case "CONC": pay = 82; System.out.println("Your Route is from Porac to Concepcion"); System.out.println("Your Total Bill is " + pay); break; case "SANMIGUEL": pay = 125; System.out.println("Your Route is from Porac to San Miguel"); System.out.println("Your Total Bill is " + pay); break; case "TAR": pay = 140; System.out.println("Your Route is from Porac to Tarlac"); System.out.println("Your Total Bill is " + pay); break; default: System.out.println("Invalid Destination"); } } public static void CLARKS() { Scanner sc = new Scanner(System.in); int pay; System.out.print("Enter Your Destination: "); String exitClarks = sc.nextLine(); switch (exitClarks) { case "MAB": pay = 4; System.out.println("Your Route is from Clark South to Mabalact(Mabiga)"); System.out.println("Your Total Bill is " + pay); break; case "CLARKN": pay = 16; System.out.println("Your Route is from Clark South to Clark North"); System.out.println("Your Total Bill is " + pay); break; case "DOLORES": pay = 21; System.out.println("Your Route is from Clark South to Dolores"); System.out.println("Your Total Bill is " + pay); break; case "CONC": pay = 52; System.out.println("Your Route is from Clark South to Concepcion"); System.out.println("Your Total Bill is " + pay); break; case "SANMIGUEL": pay = 94; System.out.println("Your Route is from Clark South to San Miguel"); System.out.println("Your Total Bill is " + pay); break; case "TAR": pay = 108; System.out.println("Your Route is from Clark South to Tarlac"); System.out.println("Your Total Bill is " + pay); break; default: System.out.println("Invalid Destination"); } } public static void MAB() { Scanner sc = new Scanner(System.in); int pay; System.out.print("Enter Your Destination: "); String exitMab = sc.nextLine(); switch (exitMab) { case "CLARKN": pay = 12; System.out.println("Your Route is from Mabalact(Mabiga) to Clark North"); System.out.println("Your Total Bill is " + pay); break; case "DOLORES": pay = 16; System.out.println("Your Route is from Mabalact(Mabiga) to Dolores"); System.out.println("Your Total Bill is " + pay); break; case "CONC": pay = 48; System.out.println("Your Route is from Mabalact(Mabiga) to Concepcion"); System.out.println("Your Total Bill is " + pay); break; case "SANMIGUEL": pay = 89; System.out.println("Your Route is from Mabalact(Mabiga) to San Miguel"); System.out.println("Your Total Bill is " + pay); break; case "TAR": pay = 104; System.out.println("Your Route is from Mabalact(Mabiga) to Tarlac"); System.out.println("Your Total Bill is " + pay); break; default: System.out.println("Invalid Destination"); } } public static void CLARKN() { Scanner sc = new Scanner(System.in); int pay; System.out.print("Enter Your Destination: "); String exitClarkn = sc.nextLine(); switch (exitClarkn) { case "DOLORES": pay = 4; System.out.println("Your Route is from Clark North to Dolores"); System.out.println("Your Total Bill is " + pay); break; case "CONC": pay = 35; System.out.println("Your Route is from Clark North to Concepcion"); System.out.println("Your Total Bill is " + pay); break; case "SANMIGUEL": pay = 77; System.out.println("Your Route is from Clark North to San Miguel"); System.out.println("Your Total Bill is " + pay); break; case "TAR": pay = 91; System.out.println("Your Route is from Clark North to Tarlac"); System.out.println("Your Total Bill is " + pay); break; default: System.out.println("Invalid Destination"); } } public static void DOLORES() { Scanner sc = new Scanner(System.in); int pay; System.out.print("Enter Your Destination: "); String exitDolores = sc.nextLine(); switch (exitDolores) { case "CONC": pay = 31; System.out.println("Your Route is from Dolores to Concepcion"); System.out.println("Your Total Bill is " + pay); break; case "SANMIGUEL": pay = 72; System.out.println("Your Route is from Dolores to San Miguel"); System.out.println("Your Total Bill is " + pay); break; case "TAR": pay = 87; System.out.println("Your Route is from Dolores to Tarlac"); System.out.println("Your Total Bill is " + pay); break; default: System.out.println("Invalid Destination"); } } public static void CONC() { Scanner sc = new Scanner(System.in); int pay; System.out.print("Enter Your Destination: "); String exitConc = sc.nextLine(); switch (exitConc) { case "SANMIGUEL": pay = 41; System.out.println("Your Route is from Concepcion to San Miguel"); System.out.println("Your Total Bill is " + pay); break; case "TAR": pay = 56; System.out.println("Your Route is from Concepcion to Tarlac"); System.out.println("Your Total Bill is " + pay); break; default: System.out.println("Invalid Destination"); } } public static void SANMIGUEL() { Scanner sc = new Scanner(System.in); int pay; System.out.print("Enter Your Destination: "); String exitSanmiguel = sc.nextLine(); switch (exitSanmiguel) { case "SANMIGUEL": System.out.print("Enter Your Destination: Tarlac "); pay = 14; System.out.println("Your Route is San Miguel from to Tarlac"); System.out.println("Your Total Bill is " + pay); break; } } public static void TARLAC() { Scanner sc = new Scanner(System.in); int pay; System.out.print("Enter Your Destination: "); String exitTarlac = sc.nextLine(); switch (exitTarlac) { case "TARLAC": System.out.println("Sorry, this is the end of SCTEX Toll Booth"); break; default: System.out.println("Invalid Destination"); } } } Colegio de San Juan de Letran Intramuros, Manila College of Engineering and Information Technology Institute of Information Technology Activity No. 2 IIT403 - COMPUTER PROGRAMMING 2 Submitted by: Christian Paul D. Chavez IIT403 – CL7 Submitted to: Ms. Vida Makiling import java.util.Scanner; public class NewClass{ Februay 4, 2019 public static void main(String[] args) { Scanner scanner = new Scanner(System.in); "); System.out.println("Christian Paul D. Chavez System.out.println("------------------------"); System.out.println(); System.out.println("NORTHBOUND"); System.out.println(); System.out.println("1.TIPO/SFEX 7.CLARK NORTH"); System.out.println("2.DINALUPIHAN 8.DOLORES"); System.out.println("3.FLORIDABLANCA 9.CONCEPCION"); System.out.println("4.PORAC 10.SAN MIGUEL"); System.out.println("5.CLARK SOUTH 11.TARLAC"); System.out.println("6.MABALACAT"); System.out.println(); System.out.println("Please enter Point of Origin: "); String POI = scanner.next(); System.out.println("Please enter your Destination:"); String dest = scanner.next(); switch (POI){ case "TIPO/SFEX": switch(dest){ case "DIN": System.out.println("Your Route is TIPO/SFEX to DINALUPIHAN"); System.out.println("Your total bill is: 60"); break; case "FLOR": System.out.println("Your Route is TIPO/SFEX to FLORIDABLANCA"); System.out.println("Your total bill is: 116"); break; case "PORAC": System.out.println("Your Route is TIPO/SFEX to PORAC"); System.out.println("Your total bill is: 157"); break; case "CLARKS": System.out.println("Your Route is TIPO/SFEX to CLARK SOUTH"); System.out.println("Your total bill is: 187"); case "MAB": System.out.println("Your Route is TIPO/SFEX to MABALACAT"); System.out.println("Your total bill is: 193"); break; case "CLARKN": System.out.println("Your Route is TIPO/SFEX to CLARK NORTH"); System.out.println("Your total bill is: 205"); break; case "DOLORES": System.out.println("Your Route is TIPO/SFEX to DOLORES"); System.out.println("Your total bill is: 209"); break; case "CONC": System.out.println("Your Route is TIPO/SFEX to CONCEPCION"); System.out.println("Your total bill is: 240"); break; case "SAN": System.out.println("Your Route is TIPO/SFEX to SAN MIGUEL"); System.out.println("Your total bill is: 282"); break; case "TARLAC": System.out.println("Your Route is TIPO/SFEX to TARLAC"); System.out.println("Your total bill is: 297"); break; default: System.out.println("INVALID DESTINATION"); } break; case "DIN": switch(dest){ case "FLOR": System.out.println("Your Route is DINALUPIHAN to FLORIDABLANCA"); System.out.println("Your total bill is: 56"); break; case "PORAC": System.out.println("Your Route is DINALUPIHAN to PORAC"); System.out.println("Your total bill is: 96"); break; case "CLARKS": System.out.println("Your Route is DINALUPIHAN to CLARK SOUTH"); System.out.println("Your total bill is: 126"); break; case "MAB": System.out.println("Your Route is DINALUPIHAN to MABALACAT"); System.out.println("Your total bill is: 132"); break; case "CLARKN": System.out.println("Your Route is DINALUPIHAN to CLARK NORTH"); System.out.println("Your total bill is: 144"); break; case "DOLORES": System.out.println("Your Route is DINALUPIHAN to DOLORES"); System.out.println("Your total bill is: 148"); break; case "CONC": System.out.println("Your Route is DINALUPIHAN to CONCEPCION"); System.out.println("Your total bill is: 179"); break; case "SAN": System.out.println("Your Route is DINALUPIHAN to SAN MIGUEL"); System.out.println("Your total bill is: 221"); break; case "TARLAC": System.out.println("Your Route is DINALUPIHAN to TARLAC"); System.out.println("Your total bill is: 236"); break; default: System.out.println("INVALID DESTINATION"); } break; case "FLOR": switch(dest){ case "PORAC": System.out.println("Your Route is FLORIDABLANCA to PORAC"); System.out.println("Your total bill is: 40"); break; case "CLARKS": System.out.println("Your Route is FLORIDABLANCA to CLARK SOUTH"); System.out.println("Your total bill is: 71"); break; case "MAB": System.out.println("Your Route is FLORIDABLANCA to MABALACAT"); System.out.println("Your total bill is: 76"); break; case "CLARKN": System.out.println("Your Route is FLORIDABLANCA to CLARK NORTH"); System.out.println("Your total bill is: 88"); break; case "DOLORES": System.out.println("Your Route is FLORIDABLANCA to DOLORES"); System.out.println("Your total bill is: 92"); break; case "CONC": System.out.println("Your Route is FLORIDABLANCA to CONCEPCION"); System.out.println("Your total bill is: 124"); break; case "SAN": System.out.println("Your Route is FLORIDABLANCA to SAN MIGUEL"); System.out.println("Your total bill is: 165"); break; case "TARLAC": System.out.println("Your Route is FLORIDABLANCA to TARLAC"); System.out.println("Your total bill is: 180"); break; default: System.out.println("INVALID DESTINATION"); } break; case "PORAC": switch(dest){ case "CLARKS": System.out.println("Your Route is PORAC to CLARK SOUTH"); System.out.println("Your total bill is: 30"); break; case "MAB": System.out.println("Your Route is PORAC to MABALACAT"); System.out.println("Your total bill is: 35"); break; case "CLARKN": System.out.println("Your Route is PORAC to CLARK NORTH"); System.out.println("Your total bill is: 48"); break; case "DOLORES": System.out.println("Your Route is PORAC to DOLORES"); System.out.println("Your total bill is: 52"); break; case "CONC": System.out.println("Your Route is PORAC to CONCEPCION"); System.out.println("Your total bill is: 82"); break; case "SAN": System.out.println("Your Route is PORAC to SAN MIGUEL"); System.out.println("Your total bill is: 125"); break; case "TARLAC": System.out.println("Your Route is PORAC to TARLAC"); System.out.println("Your total bill is: 140"); break; default: System.out.println("INVALID DESTINATION"); } break; case "CLARKS": switch(dest){ case "MAB": System.out.println("Your Route is CLARK SOUTHC to MABALACAT"); System.out.println("Your total bill is: 4"); break; case "CLARKN": System.out.println("Your Route is CLARK SOUTH to CLARK NORTH"); System.out.println("Your total bill is: 16"); break; case "DOLORES": System.out.println("Your Route is CLARK SOUTH to DOLORES"); System.out.println("Your total bill is: 21"); break; case "CONC": System.out.println("Your Route is CLARK SOUTH to CONCEPCION"); System.out.println("Your total bill is: 52"); break; case "SAN": System.out.println("Your Route is CLARK SOUTH to SAN MIGUEL"); System.out.println("Your total bill is: 94"); break; case "TARLAC": System.out.println("Your Route is CLARK SOUTH to TARLAC"); System.out.println("Your total bill is: 108"); break; default: System.out.println("INVALID DESTINATION"); } break; case "MAB": switch(dest){ case "CLARKN": System.out.println("Your Route is MABALACAT to CLARK NORTH"); System.out.println("Your total bill is: 12"); break; case "DOLORES": System.out.println("Your Route is MABALACAT to DOLORES"); System.out.println("Your total bill is: 16"); break; case "CONC": System.out.println("Your Route is MABALACAT to CONCEPCION"); System.out.println("Your total bill is: 48"); break; case "SAN": System.out.println("Your Route is MABALACAT to SAN MIGUEL"); System.out.println("Your total bill is: 89"); break; case "TARLAC": System.out.println("Your Route is MABALACAT to TARLAC"); System.out.println("Your total bill is: 104"); break; default: System.out.println("INVALID DESTINATION"); } break; case "CLARKN": switch(dest){ case "DOLORES": System.out.println("Your Route is CLARK NORTH to DOLORES"); System.out.println("Your total bill is: 4"); break; case "CONC": System.out.println("Your Route is CLARK NORTH to CONCEPCION"); System.out.println("Your total bill is: 35"); break; case "SAN": System.out.println("Your Route is CLARK NORTH to SAN MIGUEL"); System.out.println("Your total bill is: 77"); break; case "TARLAC": System.out.println("Your Route is CLARK NORTH to TARLAC"); System.out.println("Your total bill is: 91"); break; default: System.out.println("INVALID DESTINATION"); } break; case "DOLORES": switch(dest){ case "CONC": System.out.println("Your Route is DOLORES to CONCEPCION"); System.out.println("Your total bill is: 31"); break; case "SAN": System.out.println("Your Route is DOLORES to SAN MIGUEL"); System.out.println("Your total bill is: 72"); break; case "TARLAC": System.out.println("Your Route is DOLORES to TARLAC"); System.out.println("Your total bill is: 87"); break; default: System.out.println("INVALID DESTINATION"); } break; case "CONC": switch(dest){ case "SAN": System.out.println("Your Route is CONCEPCION to SAN MIGUEL"); System.out.println("Your total bill is: 41"); break; case "TARLAC": System.out.println("Your Route is CONCEPCION to TARLAC"); System.out.println("Your total bill is: 56"); break; default: System.out.println("INVALID DESTINATION"); } break; case "SAN": switch(dest){ case "TARLAC": System.out.println("Your Route is SAN MIGUEL to TARLAC"); System.out.println("Your total bill is: 14"); break; default: System.out.println("INVALID DESTINATION"); } break; default: System.out.println("INVALID POINT OF ORIGIN"); break; } } }