0

I am fairy new to Java, and I had an assignment from school, here is a picture of it: image

here is my code that I wrote:

package com.company;
import java.util.Scanner;

public class Lactose {
    public static void main(String[] args) {
        // Setting up the input object.
        Scanner INPUT = new Scanner(System.in);
        // Setting up constant values.
        int TAX = 15;
        // Printing out.
        System.out.println("---------------------------------------------------------");
        System.out.println("          Welcome to Jeddah Reservation System.          ");
        System.out.println("---------------------------------------------------------");
        System.out.println("          Enter 1 for Single room");
        System.out.println("          Enter 2 for Double room");
        System.out.print("Please enter your choice: ");
        int ROOM_TYPE = INPUT.nextInt();
        if (ROOM_TYPE == 1 || ROOM_TYPE == 2) {
            System.out.println("          Press F or f for Freshmen");
            System.out.println("          Press J or j for Junior");
            System.out.println("          Press S or s for Senior");
            System.out.print("Enter your choice: ");

there is a continuation of the code but no i think it will work. Problem is: Once it asks about the type of room, it asks me about what type of student then closes the program on it's own. Also, the If statements that checks if the user is either an F or J or S is repeating, the only change is the discount for 10+ nights any solution/example will be helpful. Thank you!

Blizzard
  • 1
  • 1

0 Answers0