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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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