Create a new class to write only the tests, not the code

Assignment Help Computer Engineering
Reference no: EM133400007

Question: Create a new class to write only the tests, not the code under test, for a method that takes in two parameters: a number of people that will be staying at a hotel and the number of nights they will be staying.

The method then returns a price per night for the hotel stay. If there are less than 5 people in the hotel room and they are staying more than 5 nights, the price would be $100x the number of nights they are staying. If there are 5 or more people, or they are staying 5 nights or less, the price is $150x the number of nights they are staying. You choose the method name, parameters and return type of the method under test. Write at least 4 tests for the method under test that would be the beginning of your TDD cycle for this code.

 

Reference no: EM133400007

Questions Cloud

Develop estimated regression equation : Based upon the results of your analysis, what estimated regression equation would you recommend using to predict Winnings ($)?
Process cost system : Process costing was best way to uncover this, considering their materials, operations costing, and unit costs. According to the textbook, Process Cost System
Write an assembly code that prints the numbers : Write an assembly code that prints the numbers from 1 to 5, 5 times on the screen. Each sequence of numbers from 1 to 5 are separated by new line
Which way would you expect the results to be wrong : You skip the standardization and run the algorithm, and find it executed just fine. You use those results to predict the diabetes status of a new population
Create a new class to write only the tests, not the code : Create a new class to write only the tests, not the code under test, for a method that takes in two parameters: a number of people that will be staying
The Ford-Firestone Case : Provide a summary of the article "The Ford-Firestone Case". What do you think was the fault for the tire exploding,
What were the consequences of the inaccuracy : Describe how you made the estimate. Discuss your reasoning for estimating the duration of the activity the way you did.
Determine amount that Henrietta can deduct : Determine the amount that Henrietta can deduct in the current year for investigating these two businesses.
Why are customers twice wieght over aspects of buisness : Why are customers twice the wieght over other aspects of buisness. In response to peers, discuss whether you agree with the proposed weighting.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Calculate the alternating sum of the first digits

Do a search for how to write a for-loop in R. Practice some simple examples from the internet.

  How would you react if you were the ceo of target

Is it ok for a victimized organization or government agency to hack back and what are the dangers?

  Prove that for all positive real numbers a and b

CSC165H1 Problem Set. Prove the following statements about little-oh, using only the definitions of little-oh and Big-Oh. You may not use any external properties of Big-Oh in this question. Prove that for all positive real numbers a and b, if a

  Why institutions might be reluctant to move the it to cloud

Discuss in 500 words, why institutions might be reluctant to move their IT to the cloud. Consider specific industries like education, medicine, military, etc.

  What are the goals of each mechanism

In a virtual memory system, a process may be allocated more or fewer frames of memory by (at least) two different mechanisms or policies.

  How do you write a while loop or a for loop

How do you write a while loop or a for loop that ONLY takes positive intergers? the interger has to be greater than or equal to 3.

  Review the essential elements of a security strategy

Review the essential elements of a security strategy. A successful IT administration strategy requires the continuous enforcement of policies, standards.

  Reflect on the use of a development methodology

Analyse source code and develop comprehensive unit test suites - Apply refactoring to identify poor programming practice in existing source code and improve

  Digital equipment and media that would have been seized

What additional sources of evidence might there be besides the digital equipment and media that would have been seized

  Software vendors often have scaled levels of support based

software vendors often have scaled levels of support depending on the purchased software package. discuss some of the

  How data gets back from google if your public ip address

Explain how data gets back from Google if your public IP address (shared to Google) is different that your IP address. How does Google's response (over http)

  Analysis of the heart health data

Faculty of Business, Government and Law Business Intelligence Systems 7156 and 6680. The requirement of the assessment is to build on earlier stages of the project, the proposal and presentation, to develop a computer-based DSS/BIS prototype for an..

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