Questions
Java homework problem. This is my hotel reservation system. I'm trying to add a few things...

Java homework problem. This is my hotel reservation system. I'm trying to add a few things to it.

You will be changing your Hotel Reservation system to allow a user to serve more rooms and the rooms will be created as objects.

  1. For this project you will be modifying the Hotel Reservation system to allow a user to serve more rooms and the rooms will be created as objects.

    1. You will be create a Room object that will allow the user to set the type of room, if they want pets, and if they want Oceanview.

      1. OV is $50 more

      2. Pets $25 more

      3. King, Suite and Queen style rooms and you can set the prices

    2. You will have an array for username and password that hold 3 userNames and 3 passwords. These will be parallel arrays. I am allowed to enter username and password 3 times and then I get kicked out.

    3. Main

      1. The main method will keep track of information for 5 room reservations objects all for 1 night

        1. Be sure to use looping, somewhere in the main java file.

        2. Create a method that will catch the object and create it. Remember you can pass by reference or return the object back to the main.

        3. Create a method to handle printing out each of the objects to the screen and the total for each room. (You can set this total in the Room Class if you wish.)

        4. Finally Create a method that will show out the grand total.

Here is my original code to be modified:

import java.util.Scanner;
import javax.swing.JOptionPane;
import java.text.DecimalFormat;

public class hotelreservation {
  
  
      public static double roomSelection(Scanner scan)
   {

       String roomSelection;
       System.out.print("Please enter the type of room desired for your stay (King/Queen/Suite/Two doubles): ");
       roomSelection = scan.nextLine();
    
       if(roomSelection.equalsIgnoreCase("Suite"))
           return 275;
       else if(roomSelection.equalsIgnoreCase("Queen"))
           return 150;
       else if(roomSelection.equalsIgnoreCase("King"))
           return 150;
       else
           return 125;
   }

   public static double roomOceanView(Scanner scan)
   {
       String response;
       System.out.print("Would you like an oceanview room (Yes/No) ? ");
       response = scan.nextLine();
    
       if(response.equalsIgnoreCase("Yes"))
           return 45;
       else
           return 0;
   }

   public static double roomPets(Scanner scan)
   {
       String response;
       System.out.print("Do you have any pets (Yes/No) ? ");
       response = scan.nextLine();
    
       if(response.equalsIgnoreCase("Yes"))
           return 50;
       else
           return 0;
   }

   public static void main(String[] args) {
     
       DecimalFormat decFormat = new DecimalFormat("0.00");
       Scanner scan = new Scanner(System.in);
       double roomReservation[] = new double[3];
       double subTotal = 0;
    
       for(int x=0;x        {
           System.out.println("Welcome to our Hotel Room Reservation Pricing System.");
           System.out.println("Please answer the following questions regarding your reservation of room #"+(x+1)+" : ");
           roomReservation[x] = roomPets(scan);
           roomReservation[x] += roomSelection(scan);
           roomReservation[x] += roomOceanView(scan);
       }
     
       for(int x=0;x        {
           System.out.println("Total cost for room #"+(x+1)+" : $"+decFormat.format(roomReservation[x]));
           subTotal += roomReservation[x];
       }
    
       System.out.println("Subtotal: $"+decFormat.format(subTotal));
       double tax = subTotal*0.05;
       System.out.println("Total Tax (5%): $"+decFormat.format(tax));
       System.out.println("Grand Total: $"+(decFormat.format(subTotal+tax)));
       scan.close();
   }

}

In: Computer Science

Discussion Question - There is an ongoing debate about the roles of quantitative and qualitative inputs...

Discussion Question - There is an ongoing debate about the roles of quantitative and qualitative inputs in demand estimation and forecasting. Those in the qualitative camp argue that statistical analysis can only go so far. Demand estimates can be further improved by incorporating purely qualitative factors. Quantitative advocates insist that qualitative, intuitive, holistic approaches only serve to introduce errors, biases, and extraneous factors into the estimation task.

Suppose the executive for the theater chain is convinced that any number of bits of qualitative information (the identity of the director, the film’s terrific script and rock-music sound track, the Hollywood “buzz” about the film during production, even the easing of his ulcer) influence the film’s ultimate box-office revenue.

How might one test which approach—purely qualitative or statistical— provides better demand or revenue estimates? Are there ways to combine the two approaches? Provide concrete suggestions.

In: Economics

A person with a cough is a persona non grata on airplanes, elevators, or at the...

A person with a cough is a persona non grata on airplanes, elevators, or at the theater. In theaters especially, the irritation level rises with each muffled explosion. According to Dr. Brian Carlin, a Pittsburgh pulmonologist, in any large audience you'll hear about 8 coughs per minute.

(a) Let r = number of coughs in a given time interval. Explain why the Poisson distribution would be a good choice for the probability distribution of r.

Coughs are a common occurrence. It is reasonable to assume the events are dependent.Coughs are a common occurrence. It is reasonable to assume the events are independent.    Coughs are a rare occurrence. It is reasonable to assume the events are dependent.Coughs are a rare occurrence. It is reasonable to assume the events are independent.



(b) Find the probability of six or fewer coughs (in a large auditorium) in a 1-minute period. (Use 4 decimal places.)


(c) Find the probability of at least eight coughs (in a large auditorium) in a 24-second period. (Use 4 decimal places.)

In: Statistics and Probability

Suppose that the sitting​ back-to-knee length for a group of adults has a normal distribution with...

Suppose that the sitting​ back-to-knee length for a group of adults has a normal distribution with a mean of mu equals 22.7 in. and a standard deviation of sigma equals 1.2 in. These data are often used in the design of different​ seats, including aircraft​ seats, train​ seats, theater​ seats, and classroom seats. Instead of using 0.05 for identifying significant​ values, use the criteria that a value x is significantly high if​ P(x or ​greater)less than or equals0.01 and a value is significantly low if​ P(x or ​less)less than or equals0.01. Find the​ back-to-knee lengths separating significant values from those that are not significant. Using these​ criteria, is a​ back-to-knee length of 24.9 in. significantly​ high? Find the​ back-to-knee lengths separating significant values from those that are not significant. ​Back-to-knee lengths greater than nothing in. and less than nothing in. are not​ significant, and values outside that range are considered significant. ​(Round to one decimal place as​ needed.).

In: Statistics and Probability

6.2.19-E Suppose that the sitting​ back-to-knee length for a group of adults has a normal distribution...

6.2.19-E Suppose that the sitting​ back-to-knee length for a group of adults has a normal distribution with a mean of mu equals 24.1 in. and a standard deviation of sigma equals 1.1 in. These data are often used in the design of different​ seats, including aircraft​ seats, train​ seats, theater​ seats, and classroom seats. Instead of using 0.05 for identifying significant​ values, use the criteria that a value x is significantly high if​ P(x or ​greater)less than or equals0.01 and a value is significantly low if​ P(x or ​less)less than or equals0.01. Find the​ back-to-knee lengths separating significant values from those that are not significant. Using these​ criteria, is a​ back-to-knee length of 26.2 in. significantly​ high? Find the​ back-to-knee lengths separating significant values from those that are not significant. ​Back-to-knee lengths greater than nothing in. and less than nothing in. are not​ significant, and values outside that range are considered significant.

In: Statistics and Probability

A person with a cough is a persona non grata on airplanes, elevators, or at the...

A person with a cough is a persona non grata on airplanes, elevators, or at the theater. In theaters especially, the irritation level rises with each muffled explosion. According to Dr. Brian Carlin, a Pittsburgh pulmonologist, in any large audience you'll hear about 18 coughs per minute.

(a) Let r = number of coughs in a given time interval. Explain why the Poisson distribution would be a good choice for the probability distribution of r. Coughs are a common occurrence. It is reasonable to assume the events are independent. Coughs are a common occurrence. It is reasonable to assume the events are dependent. Coughs are a rare occurrence. It is reasonable to assume the events are independent. Coughs are a rare occurrence. It is reasonable to assume the events are dependent.

(b) Find the probability of seven or fewer coughs (in a large auditorium) in a 1-minute period. (Use 4 decimal places.)

(c) Find the probability of at least eight coughs (in a large auditorium) in a 28-second period. (Use 4 decimal places.)

In: Math

Suppose that Disney is considering one more Toy Story movie. The company is not confident in...

Suppose that Disney is considering one more Toy Story movie. The company is not confident in box office sales, but they do believe that the file will create merchandising opportunities (DVDs, toys, clothes,..etc). Their early analysis believes the move will have an NPV of -$43.00 million if you only look at ticket sales in the theater. However, they also believe that the movie will create sales of $80.00 million per year in merchandise. The merchandise sales will decline each year by 21.00% in perpetuity. Let’s assume that after-tax operating margin on these sales is 14.00%, and that Disney has a cost of capital at 8.00%. What is the cash flow created by the merchandise side effect in the first year? (answer in terms of millions, so 1,000,000 would be 1.00)

Let’s value this as a perpetuity. The merchandise sales will continue indefinitely, BUT the sales will decrease each year. What is the net NPV for creating the movie? (answer in terms of millions, so 1,000,000 would be 1.00)

In: Accounting

provide and discuss a specific example of socialization from life experience. (For example, you can discuss...

provide and discuss a specific example of socialization from life experience. (For example, you can discuss your involvement in sports, music, theater, or other group activities, your first paid job, moving to a new city, or an important family/cultural event or holiday, like Thanksgiving).

  1. First, explain the experience in detail and then talk about what skills, values, or knowledge you developed as a result.
  2. Identify the key agents of socialization (such as family, teachers, or coaches) and their various social roles and identities.  What agents were most directly involved in this experience, and why?
  3. Reflect on the ways in which this experience is connected to cultural values and norms.  Which cultural values and norms did you learn about through this experience?
  4. Discuss how this experience contributed to your perspective and position in society or social group.  What did you learn about yourself? What did you learn about society?

In: Psychology

Suppose that Disney is considering one more Toy Story movie. The company is not confident in...

Suppose that Disney is considering one more Toy Story movie. The company is not confident in box office sales, but they do believe that the file will create merchandising opportunities (DVDs, toys, clothes,..etc). Their early analysis believes the move will have an NPV of -$39.00 million if you only look at ticket sales in the theater. However, they also believe that the movie will create sales of $82.00 million per year in merchandise. The merchandise sales will decline each year by 26.00% in perpetuity. Let’s assume that after-tax operating margin on these sales is 11.00%, and that Disney has a cost of capital at 10.00%.

A) What is the cash flow created by the merchandise side effect in the first year? (answer in terms of millions, so 1,000,000 would be 1.00)

B) Let’s value this as a perpetuity. The merchandise sales will continue indefinitely, BUT the sales will decrease each year. What is the net NPV for creating the movie? (answer in terms of millions, so 1,000,000 would be 1.00)

In: Finance

A stock recently has been estimated to have a beta of 1.32: a. What will a...

A stock recently has been estimated to have a beta of 1.32:

a. What will a beta book compute as the “adjusted beta” of this stock? (Do not round intermediate calculations. Round your answer to 2 decimal places.)



b. Suppose that you estimate the following regression describing the evolution of beta over time:

βt = 0.7 + 0.3βt–1

What would be your predicted beta for next year? (Do not round intermediate calculations. Round your answer to 3 decimal places.)

In: Finance