Ask Question
27 November, 02:20

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

+5
Answers (1)
  1. 27 November, 04:24
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers