Question: Draw a class diagram by hand for the following program on the scratch paper provided by the test administrator. Be sure to clearly write CLASS
Draw a class diagram by hand for the following program on the scratch paper provided by the test administrator. Be sure to clearly write CLASS DIAGRAM at the top of the page of scratch paper. Remember to include the relationship between the components and multiplicity values in the diagram. (15 points)
Type the pseudocode for the Buyer class (25 points) and the application (15 points) in the space provided below. Be very careful about spelling, spacing, indentation, keywords, operators, uppercase letters, and lowercase letters, since these are all very important in pseudocode. Be sure to press the Enter key at the end of each line. The Buy-Now Real Estate Company requires deposits from a buyer when a seller accepts the buyers offer on the house.
Draw the class diagram and write the pseudocode for the Buyer class that contains a contract number, the buyers name, and the price the buyer will pay for the house. Sample contract numbers are: "AA2458" and "PG67539". For this class:
Include a default constructor that initializes each attribute.
Include another constructor method that has a parameter for each data member. This constructor initializes each attribute to the value provided when an object of this type is instantiated.
Include accessor and mutator methods for each attribute.
Include a calculateDeposit() method that calculates and displays the amount of the deposit the buyer must pay, based on the following table. Hint: Remember that dollar signs and commas are not valid in numeric literals.
| Price of House | Deposit Amount |
| less than $200,000 | $2,000 |
| $200,000 - $399,999 | $4,000 |
| $400,000 and up | $6,000 |
Add to the class diagram and write the pseudocode for the application program with a main method that instantiates two objects of the Buyer class. The first object should be named condoBuyer and use the default constructor. The second object should be named ranchBuyer and use the second constructor to initialize the contract number to "AA5643", the buyer name to "I. M. Broke", and the price to be 250000. Include the following instructions in the main ( ) method, in the order specified below.
A call to print the name of the individual who purchased the ranch.
A call to set the condo price to 300000
A call to calculateDeposit( )for the ranch.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
