Ask Question
Today, 21:36

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

+2
Answers (1)
  1. 25 November, 00:49
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers