Pseudocode | Computer Science homework help

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: 

  • Children younger than 6 years old ride for free. 
  • If the ticket is bought at the train station:  
    • A person over 70 years old pays $5.20 
    • Everyone else pays $11.50. 
  • If ticket is bought inside the train, there is an extra charge of 15% compared to train station prices. 

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?

Calculate Your Essay Price
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

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.

Money-back guarantee

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 more

Zero-plagiarism guarantee

Each 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 more

Free-revision policy

Thanks 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 more

Privacy policy

Your 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 more

Fair-cooperation guarantee

By 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