Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will create two classes to work together: Housefava and HouseExceptionjava This assignment will help students... remember their ICS 1 1 1 object - creation

You will create two classes to work together: Housefava and HouseExceptionjava
This assignment will help students...
remember their ICS111 object-creation and validation skills.
get familiar with how to write and submit assignments in ICS211
Housejara
Instance variables and validity restrictions
private int mls; integer ranges between 10001 and 99999(MLS is a unique listing number for a home when on sale)
private int bedrooms; integer ranging from 0 to 5
private double price; double ranging from 0 to 1,000,000
private String seller, must be at least 2 non-blank characters long
This class must have the following methods
4 set methods, one per instance variable. 15 points each method = These methods should validate the parameters and must call the HouseException if the parameters are invalid. The method names should be as specified below. Parameter names are up to you but the methods should take the parameter data type as indicated below. Follow the coding standards for set/mutator methods.
setMils(int mls)
setBedrooms(int bedrooms)
setprice(double price)
setSeller(String seller)
4 get methods, 10 points each = fach one of these methods as you should know returns the value of an instance variable. You should know what the respective return dat type for each one is.
getMils()
getBedrooms()
getprice()
getseller()
1 tostring method. This method returns a String to be printed and takes no parameters, as you learned in ICS111. Each item/instance variable should be properly labeled. The price should be properily formatted with dollar sign and two decimals. Failure to do so will result in points deducted.
1 constructor method that validates the instance variables by calling the set methods. The call to set methods is to make sure that the parameters sent are valid while not duplicating code.
This constructor should take four instance variables as parameters, mls, bedrooms, price and seller.
Make sure that the parameters are ALWAYS in the following order (int mis, int bedrooms, double price,String seller). If parameters are not in this order, points will be deducted - Overall program structure, naming conventions and style, following the Java coding standards
image text in transcribed

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

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions