Question

In: Computer Science

Java programming : Your task is to create an application that takes orders for beach holidays,...

Java programming :

Your task is to create an application that takes orders for beach holidays, calculates, and displays the total cost.

Cost is $100 per day for accommodation

Wind surfing rental is $50 per day (not optional)

Sales tax is 7 %

The orders for this application will be how many days they wanna spend at the resort and for how many days do they want the wind surfing rental.

Solutions

Expert Solution

import java.util.*;

public class MyApp {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("Enter How may days they wanna spend at resort?");
        int days;
        days=sc.nextInt();
        System.out.println("Enter How many days do they want the wind surfing?");
        int days2;
        days2=sc.nextInt();
        double cost=100*days+50*days2;
        double sales_tax=cost*7.0/100;
        double total_cost=cost+sales_tax;
        System.out.println("Total Cost is :$"+total_cost);

    }
}


Related Solutions

Your task is to create a Java application that converts a specified amount of one currency...
Your task is to create a Java application that converts a specified amount of one currency into another currency for a user. The application must meet the following requirements: Upon execution, the application shall display a brief welcome message announcing that the user is running the currency converter application. The application shall allow a user to convert amounts between any two of the following currencies: United States Dollars (USD), British Pounds (GBP), Swiss Francs (CHF), and Indian Rupees (INR). The...
Your task is to create a Java application that converts a specified amount of one currency...
Your task is to create a Java application that converts a specified amount of one currency into another currency for a user. The application must meet the following requirements: 1. Upon execution, the application shall display a brief welcome message to the user to let her know she is running the currency converter application. 2. The application shall allow a user to convert amounts between any two of the following currencies: United States Dollars (USD), British Pounds (GBP), Swiss Francs...
Create a project plan on the game or application you are creating. Using java programming. The...
Create a project plan on the game or application you are creating. Using java programming. The project plan should include the following: A description of the game or application The IDE or game engine your plan to use to create the game or app and information on how you are going to develop the game or app If you choose to create a game, how are you going to approach the game design and game development process or if you...
Java programming Create a application with a method void (after main() ) that creates an array...
Java programming Create a application with a method void (after main() ) that creates an array and asks for the user fill it with float numbers. This array have infinite elements until the user decide that it is enough and input a command to stop. Display this array's elements data in another method void. Thanks for your help!
Java Programming CS 209 Data Structure 1. Create a method that takes an ArrayList of String...
Java Programming CS 209 Data Structure 1. Create a method that takes an ArrayList of String and returns a copy of that ArrayList with no duplicates. The relative ordering of elements in the new ArrayList should be the same. Sample Input: {"qwerty", "asdfgh", "qwer", "123", "qwerty", "123", "zxcvbn", "asdfgh"} Sample Output: {"qwerty", "asdfgh", "qwer", "123", "zxcvbn"}
Create a Java application that will exhibit concurrency concepts. Your application should create two threads that will act as counters.
JAVACreate a Java application that will exhibit concurrency concepts. Your application should create two threads that will act as counters. One thread should count up to 20. Once thread one reaches 20, then a second thread should be used to count down to 0.
Your task is to modify the program from the Java Arrays programming assignment to use text...
Your task is to modify the program from the Java Arrays programming assignment to use text files for input and output. I suggest you save acopy of the original before modifying the software. Your modified program should: contain a for loop to read the five test score into the array from a text data file. You will need to create and save a data file for the program to use. It should have one test score on each line of...
programming language is c#. Create a method that prompts a user of your console application to...
programming language is c#. Create a method that prompts a user of your console application to input the information for a student: static void GetStudentInfo() { Console.WriteLine("Enter the student's first name: "); string firstName = Console.ReadLine(); Console.WriteLine("Enter the student's last name"); string lastName = Console.ReadLine(); // Code to finish getting the rest of the student data ..... } static void PrintStudentDetails(string first, string last, string birthday) { Console.WriteLine("{0} {1} was born on: {2}", first, last, birthday); } 1. Using the...
Create a java Swing GUI application that presents the user with a “fortune”. Create a java...
Create a java Swing GUI application that presents the user with a “fortune”. Create a java Swing GUI application in a new Netbeans project called FortuneTeller. Your project will have a FortuneTellerFrame.java class (which inherits from JFrame) and a java main class: FortuneTellerViewer.java. Your application should have and use the following components: Top panel: A JLabel with text “Fortune Teller” (or something similar!) and an ImageIcon. Find an appropriate non-commercial Fortune Teller image for your ImageIcon. (The JLabel has a...
java Programming Problem 1: Reverse Characters Create an application ReverseCharacters in which you use an array-based...
java Programming Problem 1: Reverse Characters Create an application ReverseCharacters in which you use an array-based stack to read a sentence from the keyboard, and reverse the order of the letters in each word. Print the initial sentence, as well as the result of the reversal operation. Your Tasks: Using the information given in your textbook, create a class named ArrayBasedStack, that will help you solve the problem given above by providing the stack operations you need for this application....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT