MUST BE COMPLETED TODAY AT 9PM EST!!!!!
1. Train Ticket
Train Ticket for one person. Write a program that reads a person’s age, then computes and displays the price the person needs to pay for the train ride according to the following rules:
Note that a person’s age is within the range of 0 to 120 years. Other inputs are considered error conditions.
1.1- Inputs, Outputs and Error Conditions
In the space below, determine the inputs, outputs and error conditions for the problem.
1.2- Algorithms
In the space below, write your algorithm using pseudocode
1.3- Test cases
In the space below, list a thorough set of test cases for your program. Write in the following format [inputs], where the inputs are separated by commas. [inputs][output]
2. Bank
A bank charges fees and/or gives interest based on the balance of a customer. Write a program that reads the customer balance then calculates and displays the new balance after the application of fees and or interest based on the following rules:
• A negative balance incurs a $50 overdraft fee. • A balance below $500 (but positive) incur on a $10 maintenance fee. • A balance from $500 to $1000 (inclusive) gain 0.1% interest. • A balance over $1000 will gain 2% interest.
2.1-Input, Output, Error Conditions
In the space below, determine the inputs, outputs and error conditions for the problem.
2.2- Algorithm
In the space below, write your algorithm using pseudocode
2.3- Test cases
In the space bellow, list a thorough set of test cases for your program. Write in the following format [inputs], where the inputs are separated by commas. [inputs][output]
3. Count Operations – WCS111 FM
WCS111 FM, a radio station by computer scientists for computer scientists. The station runs a contest where listeners win prizes based on how many hours they spend programming in Java. The following program displays the listener prize based on the number of hours spent programming.
3.1- Minimum
What is the minimum number of operations that can be executed in the code?
3.2- Maximum
What is the maximum number of operations that can be executed in the code?
4. Count Operations – Lucky Twos
Lucky Twos determines and displays the number of digits that are 2s in a whole number. For example, the number of 2s in 3487 is 0, while the number of 2s in 272521 is 3. Note: whole numbers are non-negative integers starting at zero 0, 1, 2, 3, 4. Assume that the fractional part is discarded in the division: 10 / 4 = 2 8 / 5 = 1 20 / 3 = 6
4.1- Let n be the number of digits of the whole number. What is the number of operations that are executed in the code in terms of n?
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more