Write a program that contains an array of rental prices

Assignment Help Computer Engineering
Reference no: EM132209647

Question :

Write a program that contains an array of rental prices initialized with the following data: 550.00, 675.00, 850.00.

The data is represented as rent prices for a one, two, or three bedroom property. (e.g. A three bedroom rental would cost $850.00 per month.)

The main() function will ask the user for their full name, and the city and state that they are interested in finding a rental property.

Your program will then call a function called getData() that will ask the user for the total number of bedrooms and the number of pets that they have. This data needs to be returned back to main().

You must validate the data! Number of bedrooms can only be 1-3 and the number of pets can't be a negative number.

Allow the user to continue entering data until they comply. Once you receive the validated data from the user, your main() function will then print the Rental Contract as follows where the rent array is used for the number of bedrooms and each pet costs $9.50 per month:

Please enter your full name: John Smith

Please enter the city you are interested in: Dearborn

Please enter the state: MI How many bedrooms would you like 1-3? 2

How many pets do you have? 3 Rental contract for John Smith located in Dearborn, MI Rent for a 2 bedroom is: $675.00

Additional cost for pets: $28.50

Your total monthly rent will be $ 703.50 You must print a copy of your source code AND upload your .c or .cpp file to our moodle class online.

Reference no: EM132209647

Questions Cloud

Write a program that configures the uart for operation : Write a program that configures the UART for operation at 115200 baud, 8 data bits, no parity and 1 stop bit (assume an 8 MHz clock for MSP430).
Write a program that contains a definition for data types : Question :Write a program that contains a definition for each data type listed below in Microprocessor Assembly Language, using Assembly Code.
Create an exempt algorithm : Create an algorithm called exemptAlgorithm.txt. You will be writing a program to determine whether or not a student is exempt from the final exam in COP1000C.
Create a file of your own and test your code : Write a program that counts the total number of lines, words and characters (not including whitespace) and average word length in a given text file.
Write a program that contains an array of rental prices : Write a program that contains an array of rental prices initialized with the following data: 550.00, 675.00, 850.00.
Explain the motivation underlying each deception : In a 400-600 word paper, explain the motivation underlying each deception, how the deception is presented, and reasonable ways to detect and protect yourself.
Write a program in which you create a const whose value : Write a program in which you create a const whose value is determined at runtime by reading the time when the program starts
Write a program that converts seconds into minutes : Use the new Scanner: method and allow the user to input the number of seconds she wants to convert.
Calculate how many years since person was hired : Your program should be able to list all records or one or more selected records. It should also calculate how many years since person was hired.

Reviews

Write a Review

Computer Engineering Questions & Answers

  What does the name ajax stand for

What does the name Ajax stand for? What is Ajax, and what does it do? Give an example of how Netflix® uses Ajax, and define why this makes the Web site faster.

  Explain why are professional organizations significant to

why are professional organizations important to continual learning? what professional organizations benefit both the

  What the program does are in comments at the beginning

The method is passed a list of comma separated last names (lastNamelList) as well as a name for which this list should be searched (searchForMe).

  What equilibrium temperature will the thermometer record

Consider the burning of a droplet of ethyl alcohol (or a wet wick) in an atmosphere of pure oxygen. How does the burning rate compare with the same droplet.

  How many parity check bits must be included with the data

How many parity check bits must be included with the data word to achieve single error-correction and double-error detection when the data word contains:

  Testing program using numbers of command line arguments

Test your program thoroughly utilizing different numbers of command line arguments.

  Develop the project idea based on the given steps

Project is a short or long-term activity with a stated beginning and end time. Projects requires several organized activities with defined scope and resources.

  What is the largest positive and smallest negative number

What is the largest positive and the smallest negative number that can be stored on this system if the storage is normalized? What bias should be used in the exponent if we prefer all exponents to be nonnegative?

  Write an armv8 assembly program to find the sum

Assume the value of n is stored in register X19 and n unsorted 64-bit values are stored as constant values in the data section of the assembly code.

  Be sure to use variables the scanner class and computations

develop a computer class that describes your computer. the class must have at least five attributes comprised of a

  Design an e-r diagram for keeping track of exploits of team

Design an E-R diagram for keeping track of the exploits of your favourite sports team. You should store the matches played, the scores in each match.

  Describe j2ee securing the companys web-based applications

Describe J2EE, and securing the company's web-based applications that generate revenue for the organization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd