Ask Question

Jackson builders is constructing new homes in the Parkway subdivision. The company needs the logic for an application that ncalls a method that computes the final price for construction of a new home. The main () method prompts the user for the number of bedrooms and bathrooms in the home and for the salespersons commission expressed as a percentage, and then displays the final price. Create calculatePrice () method that determines the final price and returns the value to the calling method. The calculatePrice () method requires three arguments:bedrooms, baths, and salesperson commission rate. A homes final price is the sum of the base price of $100,000 plus $20,000 per bedroom,$30,000 per bathroom, and the salesperson commission amount. in programming logic and design fourth edition Joyce Farell pg, 246 no 7 need logic for application

+1
Answers (1)
  1. 2 October, 19:52
    0
    The calculatePrice () method can be written in C. It will use and return doubles (which allows for decimals). It will calculate the house price of $100K + $20K per bedroom and $30K per bathroom. Next it will take that price and append the sales percentage and return that value.

    double calculatePrice (decimal numBedrooms, decimal numBathrooms, decimal salesPercentage)

    {

    decimal housePrice = 100000 + (20000 * numBedrooms) + (30000 * numBathrooms);

    return housePrice + (housePrice * salesPercentage);

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Jackson builders is constructing new homes in the Parkway subdivision. The company needs the logic for an application that ncalls a method ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers