Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Jacob and Selena both work for a real estate company. They earn 3 . 1 0 % as a seller agent if they help a

Jacob and Selena both work for a real estate company. They earn 3.10% as a seller agent if they help a client sell a house, or 2.35% as a buyer agent if they help a client buy a house. A home was recently sold for $750,000.00 for which Jacob was the seller agent and Selena was the buyer agent. Create a program to output the information given in blue below using the following required steps:
create 5 variables of type double named sellerAgentPercentage, buyerAgentPercentage, homePrice, jacobsCommission, selenasCommission (yes, start the variable names with a lowercase letter) and set each variable's value according to the information given above.
write 1 long print statement to generate the following 4 lines of output given below. Hint: use "
" to move to the cursor to the next line, see chapter 2 for examples.
Price of the house: $(DisplayvalueHerewithoutparenthesis)
Jacob's Commission: $(DisplayvalueHerewithoutparenthesis)
Selena's Commission: $(DisplayvalueHerewithoutparenthesis)
Total Commission: $(DisplayvalueHerewithoutparenthesis)
For example, Output should look something like the following. Actual values are hidden since you need to calculate and display them.
Price of house: $xxxx
Jacob's commission: $yyyy
Selena's commission: $zzzzz
Total commission: $nnnnnn

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

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

0764549634, 9780764549632

More Books

Students also viewed these Databases questions

Question

Why is executive onboarding for external hires so difficult?

Answered: 1 week ago

Question

Calculate the lifetime value (LTV) of a loyal customer.

Answered: 1 week ago

Question

Use service tiering to manage the customer base and build loyalty.

Answered: 1 week ago