How to complete input assertion and output assertion

Assignment Help Programming Languages
Reference no: EM1369563

Consider the game for "pass/fail"

A student decided to speed up the play by modifying the rules. He suggests that for each round of the game a student would take out five coins and return back only one. The rules given were incomplete:

1.a Invent game rules for a game that begins with any number of coins.
{ }
use rules
Take out 5
Put back 1
{ }

1.b Complete the input assertion and output assertion that will guarantee ONLY that the game will always terminate (does not matter if the student ends guilty or innocent). Add only assertions and invariants that can help you reason about termination.

1.c Complete the input assertion and output assertion that will guarantee that the student always ends the game passing the class. Add assertions and invariants that can help you reason about your claim.

1.d Complete the input assertion and output assertion that will guarantee that the student is never fail the class (hint- this is NOT the same as 1.c) Add only assertions and invariants that can help you reason about partial correctness.

Reference no: EM1369563

Questions Cloud

Explain relationship between privacy and it : Explain the relationship between privacy and IT. Describe some of the threats to information security and some of the measures you can take to protect information resources.
Fed buys securities in the open market : Below are events that might affect supply of money, the demand for money, or the interest rate. Explain how each event may affect these three economic variables.
What alpha do investors in davitas fund : What alpha do investors in Davita's fund expect to receive and how much money will Davita have under managerment?
What cost curves if any does this tax affect : Government says that firm X must pay $1000 in taxes simply because it is in business of producing a good. What cost curves if any does this tax affect and does MC change if TC changes.
How to complete input assertion and output assertion : Complete input assertion and output assertion which will guarantee that student always ends game passing class. Add assertions and invariants which can help reason about claim.
Find profit-maximizing choice of q for smith : Write down an expression π(q ) for profits as a function of q. Find profit-maximizing choice of q for Smith and corresponding price and profit.
Show the primary data collection method : Develop three, related research questions you would like to answer for your work situation and show one primary data collection method you would choose to answer the questions.
Computing the equilibrium price : In 2008, box industry was perfectly competitive. The lowest point on long run average cost curve of each of the identical box producers was $4,
Assume that the service rate to a waiting line system : Assume that the service rate to a waiting line system is 10 customers per hour (exponentially distributed). Analyze how the average waiting time is expected to change

Reviews

Write a Review

 

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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