Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java thank you! 2 separate files thanks!!: 1.Suite.java 2.SuiteTester.java (provided) Use the following file: SuiteTester.java public class SuiteTester { public static void main(String[]args) { Suite

java thank you!

2 separate files thanks!!:

1.Suite.java

2.SuiteTester.java (provided)

image text in transcribed

Use the following file:

SuiteTester.java

public class SuiteTester { public static void main(String[]args) { Suite r = new Suite("Ocean", "Fall", 1); System.out.println(r.getCost()); System.out.println("Expected: 250.0"); r = new Suite("ocean", "Winter", 3); System.out.println(r.getCost()); System.out.println("Expected: 315.0"); r = new Suite("street", "winter", 2); System.out.println(r.getCost()); System.out.println("Expected: 150.0"); r = new Suite("Street", "Winter", 4); System.out.println(r.getCost()); System.out.println("Expected: 210.0"); r = new Suite("street", "Winter", 5); System.out.println(r.getCost()); System.out.println("Expected: 1000.0"); r = new Suite("Ocean", "Summer", 6); System.out.println(r.getCost()); System.out.println("Expected: 1200.0"); } }
The lava Bcach Resort has two types of suites:Occan Viaw and Stroct Side. The suites canccommodate cither two, 4 people, or more. The rates are higher in summer than in the winter. Write an application that can determinc the cost of a suite. Suite charges are in the q ven table. Type of suite is specilies as Ocean" rs The season is Summer or "Winter and is case in ensitive treel ad is cese insensitive Ocean Street 2 people 4 people 2 people 4 people Summer $250$37020 S325 Winter 1 Write a class Suita. It has a constructor that takes three parameters: *publio Suite(string view, string season, int occupants) Note: you should not change the case of the instance variable when initial zing t also has a method: e publis double eCosto The cost is based on e table above one person costs the same as two people and three people cost the same as 4 people. For more thanpeople the charge is Ocean. If the season is anything oter than Surimer r"Winter, carge the rate fr Surnner. LIse nested if staterments at $200 per person for every room r vie is a string other than Ocean or Street charge the ate for Provide Javadoc

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions

Question

5. Wyeth Pharmaceuticals

Answered: 1 week ago