Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A Java problem Write a Driver 1. Write a driver to test your House class using user input. Name your driver using the format PX_LastName_FirstName_HouseDriver.

A Java problemimage text in transcribed

Write a Driver 1. Write a driver to test your House class using user input. Name your driver using the format PX_LastName_FirstName_HouseDriver. o Create a default house and print out the result of calling toString() on the house. o Print out the number of doors, number of windows, number of bedrooms, and asking price using the getters o Prompt the user for the number of number of doors, windows and bedrooms, and for the asking price. o Create a house using the values the user entered. o Print out the result of calling toString() on the house created by the user. o Print out whether the house is above, below or at market value o Add 1 bedroom to the house the user created. o Prompt the user for a new asking price. o Change asking price for the user created house using the setter. o Print out "After adding a bedroom: " o Print out the result of calling toString() on the house created by the user. o Print out whether the house is above, below or at market value Here is some sample output (your wording can vary) A 3 bedroom house with a market value of $489000.0 is for sale with asking price $435000 Doors: 10 Windows: 8 Bedrooms: 3 Asking Price: $435000.0 How many doors do you want? 5 How many windows do you want? 8 How many bedrooms do you want? 2 What is your asking price? 378000 A 2 bedroom house with a market value of $434000.0 is for sale with asking price $378000 The asking price is below market value. What is your new asking price? 567000 After adding a bedroom: A 3 bedroom house with a market value of $492000.0 is for sale with asking price $567000 The asking price is above market value

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

Professional SQL Server 2000 Database Design

Authors: Louis Davidson

1st Edition

1861004761, 978-1861004765

More Books

Students also viewed these Databases questions