i need help to write a code for the folllowing question.

A realtor wishes to track her commissions of house sales. The information that she collects is as follows:

house address a string
house type a string ( split level, bungalow, etc.)
sale price a double

She wishes to calculate the commission for each house as well as find the total commission earned for all houses. Commission is calculated as 7% of the first $100,000 and 3.5% of any amount over $100,000. Create an application that will accept an array of house objects and return the total commission. The application should also be able to calculate the commission earned on each house.

***Use the following test data:
123 Main Street, Split level, 250000.00
456 Elm Street, Bilevel, 150000.00
789 Oak Ave, Bungalow, 95000.00
***

public class House
{
   private String houseAddress;
   private String houseType;
   private double sellingPrice;

   House( String address, String type, double price)
   {
      houseAddress = address;
      houseType = type;
      sellingPrice = price;
   }

   public String getHouseAddress()
   {

   }

   public String getHouseType()
   {

    }

   public double getSellingPrice()
   {

   }

the class has to be something like this

Recommended Answers

All 4 Replies

Do you have any specific questions you'd like to ask about your assignment?

with this there is three classes i jus need an example and i cud move on frm there. It would be very nice if someone could help me

i just need an example

You posted a sample of a class in your first post. Is there a problem with that code?
If so, please post it and we'll try to help you fix it.

are you illiterate that you can't write a simple program? do it yourself and stop asking people to help you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.