2
2
import java.util.Scanner;
public class JavaApplication11 {
switch (choice) {
case "1":
System.out.println("You selected Food. Available items:");
System.out.println("a. Dog Food");
System.out.println("b. Cat Food");
System.out.println("c. Bird Food");
System.out.print("Choose an item (a/b/c): ");
char foodChoice = scan.nextLine().charAt(0);
if (foodChoice == 'a' || foodChoice == 'b' || foodChoice ==
'c') {
System.out.println("Item added to cart!");
totalItems++;
} else {
System.out.println("Invalid choice.");
}
break;
case "2":
System.out.println("You selected Grooming Supplies. Available
items:");
System.out.println("a. Shampoo");
System.out.println("b. Brush");
System.out.println("c. Nail Clippers");
System.out.print("Choose an item (a/b/c): ");
char groomingChoice = scan.nextLine().charAt(0);
if (groomingChoice == 'a' || groomingChoice == 'b' ||
groomingChoice == 'c') {
System.out.println("Item added to cart!");
totalItems++;
} else {
System.out.println("Invalid choice.");
}
break;
case "3":
System.out.println("You selected Toys. Available items:");
System.out.println("a. Chew Toy");
System.out.println("b. Ball");
System.out.println("c. Squeaky Toy");
System.out.print("Choose an item (a/b/c): ");
char toysChoice = scan.nextLine().charAt(0);
if (toysChoice == 'a' || toysChoice == 'b' || toysChoice ==
'c') {
System.out.println("Item added to cart!");
totalItems++;
} else {
System.out.println("Invalid choice.");
}
break;
case "4":
System.out.println("You selected Basic Pet Supplies. Available
items:");
System.out.println("a. Collar");
System.out.println("b. Leash");
System.out.println("c. Bowl");
System.out.print("Choose an item (a/b/c): ");
char suppliesChoice = scan.nextLine().charAt(0);
if (suppliesChoice == 'a' || suppliesChoice == 'b' ||
suppliesChoice == 'c') {
System.out.println("Item added to cart!");
totalItems++;
} else {
System.out.println("Invalid choice.");
}
break;
case "5":
System.out.println("You selected First Aid and Hygiene
Supplies. Available items:");
System.out.println("a. Bandages");
System.out.println("b. Antiseptic");
System.out.println("c. Wet Wipes");
System.out.print("Choose an item (a/b/c): ");
char hygieneChoice = scan.nextLine().charAt(0);
if (hygieneChoice == 'a' || hygieneChoice == 'b' ||
hygieneChoice == 'c') {
System.out.println("Item added to cart!");
totalItems++;
} else {
System.out.println("Invalid choice.");
}
break;
case "6":
System.out.println("Thank you for shopping with us!");
System.out.println("Total items in your cart: " + totalItems);
System.out.println("Goodbye!");
scan.close();
return;
default:
System.out.println("Invalid choice. Please try again.");
}
}
}
public static void appointment(){
Scanner scan = new Scanner(System.in);
System.out.println("Hello, this is Paws Vet Clinic. Book an appppointment
with us!\nWe are open Mondays through Thursdays, 8:00am to 5:00pm.");
System.out.println(" ");
System.out.println("If you'd like to book an appointment press [A]");
switch(dec)
{
case "A":
{
System.out.print("What kind of pet do you have?(dog, cat): ");
String pet = scan.next().toUpperCase();
switch (pet) {
case "DOG":
{
System.out.print("What is the breed of your pet?: ");
String breed = scan.next().toUpperCase();
System.out.print("How old is your pet?: ");
int age = scan.nextInt();
System.out.print("Please choose a procedure (groom, checkup,
vaccination):");
String procedure = scan.next().toUpperCase();
switch (procedure) {
case "GROOM":
System.out.println("You have selected grooming services.");
System.out.print("Would you like parasite control service included?
There would be an additional 300php in your balance. (yes/no): ");
String pc = scan.next().toLowerCase();
int tp = 0;
if (pc.equals("yes")) {
System.out.println("Parasite Control will be included in the
grooming.");tp = groom + ag;
} else {
System.out.println("Only grooming will be provided.");tp=groom;
}
System.out.println("");
System.out.println("Here's the information about your
appointment:");
case "CHECKUP":
System.out.println("You have selected a routine check-up.");
System.out.print("Do you want to include vaccinations during the
check-up? There would be an additional 400php in your balance.(yes/no):");
String vaccination = scan.next().toLowerCase();
int p = 0;
if (vaccination.equals("yes")) {
System.out.println("Vaccinations will be administered during
the check-up.");p= check + av;
} else {
System.out.println("Only the check-up will be performed.");p =
check;
}
System.out.println("");
System.out.println("Here's the information about your
appointment:");
case "VACCINATION":
System.out.println("You have selected vaccination services.");
System.out.print("Is this for a specific vaccine? (yes/no):");
String specificDisease = scan.next().toLowerCase();
int t = 0;
if (specificDisease.equals("yes")) {
System.out.print("Please specify the vaccine (CPV, FPV, etc.):
");
String vac = scan.next();
System.out.println("Preparing vaccination for " + vac +
".");t=vaccine+aav;
} else {
System.out.println("Administering standard
vaccinations.");t=vaccine;
}
System.out.println("");
System.out.println("Here's the information about your
appointment:");
break;
}
break;
}
case "CAT":
{
System.out.print("What is the breed of your pet?: ");
String breed = scan.next().toUpperCase();
System.out.print("How old is your pet?: ");
int age = scan.nextInt();
System.out.print("Please choose a procedure (groom, check-up,
vaccination):");
String procedure = scan.next().toLowerCase();
switch (procedure) {
case "GROOM":
System.out.println("You have selected grooming services.");
System.out.print("Would you like parasite control service included?
There would be an additional 300php in your balance. (yes/no): ");
String pc = scan.next().toLowerCase();
int tp = 0;
if (pc.equals("yes")) {
System.out.println("Parasite Control will be included in the
grooming.");tp = groom + ag;
} else {
System.out.println("Only grooming will be provided.");tp=groom;
}
System.out.println("");
System.out.println("Here's the information about your
appointment:");
case "CHECKUP":
System.out.println("You have selected a routine check-up.");
System.out.print("Do you want to include vaccinations during the
check-up? There would be an additional 400php in your balance.(yes/no):");
String vaccination = scan.next().toLowerCase();
int p = 0;
if (vaccination.equals("yes")) {
System.out.println("Vaccinations will be administered during
the check-up.");p= check + av;
} else {
System.out.println("Only the check-up will be performed."); p =
check;
}
System.out.println("");
System.out.println("Here's the information about your
appointment:");
case "VACCINATION":
System.out.println("You have selected vaccination services.");
System.out.print("Is this for a specific vaccine? (yes/no):");
String specificDisease = scan.next().toLowerCase();
int t = 0;
if (specificDisease.equals("yes")) {
System.out.print("Please specify the vaccine (CPV, FPV, etc.):
");
String vac = scan.next();t=vaccine;
System.out.println("Preparing vaccination for " + vac + ".");
t=vaccine+aav;
} else {
System.out.println("Administering standard vaccinations.");
t=vaccine;
}
System.out.println("");
System.out.println("Here's the information about your
appointment:");
default:
System.out.println(" ");
System.out.println("Thank you for your inquiry! Unfortunately, we do
not provide services for all pet types. We specialize in certain animals, so we
recommend reaching out to a clinic that can better meet your needs. \nIf you have
any other questions or need assistance, feel free to ask!");
break;
}
}
}
break;
}
case "X":
{
System.out.println("You've successfully canceled your booking.");
}
default:
{
System.out.println("Thank you so much.");
}
}
}