Call us 24/7: + 1(925)399 0085

Get your paper done by an expert

No matter what kind of academic paper you need, it is simple and secure to hire an essay writer for a price you can afford at StudyAcer. Save more time for yourself.

WhatsApp + 1(925)399 0085
$ 10
free
  • bibliography
  • title page
  • revisions
per page
19 k happy customers
4.7 out of 5 satisfaction rate
27 writers active

 

CS 151 – HOMEWORK 2

(due: Thu, 9/12/13)

 

CS 151 – HOMEWORK 2

(due: Thu, 9/12/13)

 

 

OPTIONAL WORK:

 

The Getting Started With TextPad tutorial describes how to obtain the TextPad Integrated Development Environment (IDE) and a Java compiler for home use. It’s up to you whether you’d like to obtain them for home use.

 

 

HOMEWORK SUBMISSION POLICIES:

 

·         For the first two homework assignments, submit your homework as hardcopy (paper) at the beginning of the class period. If you’re late to class, your homework is considered late.

·         Make sure that the problems in your homework document are in the same order as the problems in the homework assignment.

·         Starting with the third homework, you’ll be required to put all of your work into a computer document. If you’d like to do that for this homework, use Microsoft Word for the short answer and algorithm questions, use Microsoft Visio for the flowchart questions, and use Microsoft Excel for the trace questions.

·         You can find Visio on Park’s lab computers. To learn how to use it, use Visio’s help files, search the Internet for help, or ask a tutor in the Academic Support Center.

 

HOMEWORK ASSIGNMENT GUIDELINES:

 

As always, read and follow the guidelines as stated in the Homework Assignment Guidelines document. For this homework assignment, the document’s tracing and sample sessions sections are particularly relevant.

 

 

REVIEW QUESTIONS (Answers to “review questions” are in the book. Do not submit answers to review questions. But please take them seriously as they are good candidates for exam questions.):

 

Chapter 2: 11-19

 

 

Submit answers for all of the following questions.

 

EXERCISES:

 

Chapter 2: 2-6

 

ADDITIONAL EXERCISE:

Learn how to use TextPad by working your way through the Getting Started With TextPad tutorial. In the tutorial, you will be asked to enter two programs. For your Countdown program, submit hardcopy of 1) the source code, and 2) the output. Note that you’re not required to submit source code or output for your Hello program.

 


PROJECTS:

 

1.      [after §2.9] Loop termination by user-query method – flowchart

 

Draw a flowchart that calculates and prints the total cost for a series of purchases. Use a loop to repeatedly ask the user to enter the price and quantity of items purchased. Within the loop, accumulate the total cost of the purchases so far. The algorithm should generate a display of prompts, inputs, and final output that looks like this:

 

 

2.      [after §2.9] Loop termination by user-query method – pseudocode

 

Provide a solution to the previous problem in the form of pseudocode.

 

3.       [after §2.9] Loop termination by sentinel-value method

 

Write a pseudocode algorithm that calculates and prints the total cost for a series of purchases. Use a loop to repeatedly ask the user to enter the price and quantity of items purchased. Within the loop, accumulate the total cost of the purchases so far. Use a negative number for a sentinel value. More specifically, when the user enters a negative number for the price, the loop should terminate. The algorithm should generate a display of prompts, inputs, and final output that looks like this:

 

    


 

4.       [after §2.9] Loop termination by counter method

 

Write a pseudocode algorithm that calculates and prints the average number of goals scored per team for a series of soccer match scores. Your algorithm should initially ask the user for the number of soccer match scores that are to be entered. Use a counter loop to ensure that the loop repeats that number of times. Inside the loop, your algorithm should ask the user to enter two scores, one for each team. To read in the two scores, simply use two separate input statements in the normal manner. The algorithm should generate a display of prompts, inputs, and final output that looks like this:

 

 

Provide a graceful response if the number of scores equals zero:

 

 

 

 

Our guarantees

Study Acers provides students with tutoring and help them save time, and excel in their courses. Students LOVE us!No matter what kind of essay paper you need, it is simple and secure to hire an essay writer for a price you can afford at StudyAcers. Save more time for yourself. 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

Our Homework Writing Disciplines

With a highly diverse team in almost all academic fields including: