1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
natta225 [31]
4 years ago
13

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
Computers and Technology
1 answer:
lord [1]4 years ago
8 0
<span>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);
}</span>
You might be interested in
The byte that
qwelly [4]
The decimal value 15 would be A. 00001111
4 0
2 years ago
Write a recursive function next_pow2(n) that returns the smallest integer value p such that for a non-negative value n. For exam
Finger [1]

Answer:

Explanation:

The following code is written in Python and is a recursive function as requested that uses the current value of p (which is count in this instance) and raises 2 to the power of p. If the result is greater than or equal to the value of n then it returns the value of p (count) otherwise it raises it by 1 and calls the function again.

def next_pow2(n, count = 0):

   if (2**count) < n:

       count += 1

       return next_pow2(n, count)

   else:

       return count

8 0
3 years ago
You're working on a TV that has a hard coded list of channels (use an enum for this list) and you're asked to create a mechanism
ra1l [238]
Jsjsjsoos I jdkkskso I iDisks I iiddikdk I ididkkd
8 0
3 years ago
Write statements that output variable numMugs as follows. End with a newline. Ex: If numMugs is 10, the program should output: N
baherus [9]

Answer:

numMugs=input(); #take input from the user and store it on a numMugs variable.

print ('Number of mugs:'+numMugs) #print the numMugs variable value with the Number of mugs: line.

Output:

  • If the input is 8 then the program is print Number of mugs: 8.
  • If the input is 'Harry' then the program is print Number of mugs: Harry.

Explanation:

  • The above program is in python language with the two statements one in input and the other is output.
  • The first line takes input and stores it into a variable named "numMugs".
  • The second line print the value as Number of mugs: value_of_numMugs.
  • The above program works for any type of input. It can work for the string data type or integer data type or character data type or any other data type.
3 0
3 years ago
Secondary storage devices are sometimes referred to as
leonid [27]

Definition - What does Secondary Storage Device mean?


A secondary storage device refers to any non-volatile storage device that is internal or external to the computer. It can be any storage device beyond the primary storage that enables permanent data storage.


A secondary storage device is also known as an auxiliary storage device or external storage

.


7 0
3 years ago
Read 2 more answers
Other questions:
  • Which type of connection to the Internet is capable of the fastest transfer rates
    14·2 answers
  • The rules and guidelines for appropriate computer mediated communication are called?
    9·1 answer
  • Which partitioning method must you use for a 4-tb hard drive?
    13·1 answer
  • According to which virtue do you need to secure information by limiting computer access to authorized personnel only ?
    13·2 answers
  • What is the name of a wireless network that allows phones and laptops to connect with pda's using bluetooth communications?
    14·1 answer
  • What is a program file​
    14·1 answer
  • PLEASE HELP there are TWO ANSWERS
    6·1 answer
  • Berat wants to compare images of what the streets of New York City looked like one hundred years ago to now. Which of the follow
    14·2 answers
  • When you add encryption to a powerpoint presentation what does it do
    14·1 answer
  • You want to add a caption to a table. which tab contains this option?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!