Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. (40 points) You are hired by Bubble Real Estate to write a program to help them keep track of use sales and commissions. A

image text in transcribed
5. (40 points) You are hired by Bubble Real Estate to write a program to help them keep track of use sales and commissions. A commission is a certain percentage of the selling price that is earned by the agent who sold the house. On separate blank sheet(s), write 2 classes (Sales and House) as follows: Note # 1: There is no input from the user. The only method that prints is the main method of Sales. Note #2: The Sales class uses the House class, like the Kennel class uses the Dog class, TestPoint uses Point, Bookshelf uses Book, RollingDice uses Die, Transactions uses Account.. following: Instantiate (create) 2 objects of type House, e.g housel house2 Address 123 Main St 444 Elm St ales agent Don Laura selling price 225000.00 385000.00 . Call (invoke) the appropriate method of the House class (see below) in order to compute the commission for each house. commission. You do not need to format For each house, print the sales agent and computed the output in currency format. . Sample output (for the above example): Don earned a commission of 4500.00 Laura earned a commission of 7700.00 (You may assume that each house is sold by a different agent.) attributes representing a house's address, sales agent, and selling price, and a COMMISSION_RATE fixed at 0.02. a constructor that is passed 3 parameters representing a house's address, sales agent, and selling price, and initializes the corresponding attributes. commission, computed as the selling price multiplied by the COMMISSION RATE. An accessor (getter) method getSalesAgent() and a mutator (setter) method . a method named computeCommission that receives no parameters and returns the Extra credis Define a toString method in the House class that returns a multi-line String representation that includes the values of all attributes of a house, and call this method

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_2

Step: 3

blur-text-image_3

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

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

Give three examples showing why a business needs to forecast.

Answered: 1 week ago