Step 1: Carefully read the assignment instructions in the attached document.

Step 2: Carefully read the evaluation criteria in the attached document.

Step 3: Do the assignment

Step 4: Review your own assignment against the evaluation criteria and the pseudocode checklist, to be sure that you have not omitted any require part.

Assignment (Repetition Statements)

In this assignment, you will design a program to perform the following task:

Design a program to print out a list of the squares of all of the integers in a range of integers provided by the user. (A range of integers consists of all the integers from a starting point to an end point; for example, the integers from 5 to 13 inclusive, or the integers from -3 to 7 inclusive. The square of a number is the product of an integer with itself; for example, the square of 5 is 25, and the square of -3 is 9.)

The range may not be empty.(This means that the starting point must be less than or equal to the end point.) The squares shall be printed one per line.

User inputs shall be validated: if any unacceptable input is received, the program shall issue an appropriate error message and request the user to re-enter the input.

Before attempting this exercise, be sure you have read all of chapters 4 and 5 and course module readings, participated in the weekly conferences, and thoroughly understand the examples throughout the chapter. Also, work through the Fibonacci, Data Validation A, and DataValidation B demonstrations at

Be sure you understand how they work. If you have any questions about them, do post them in the Week 5 conference.

You will need to use the techniques shown in the Data Validations demonstrations to do the data validation part of this assignment. Do not re-invent the wheel! Adapt the code in one of the demos to the requirements of this assignment.

There are 3 main components of your submission: problem analysis, program design, and sample test data.

A. Analysis Requirements

Your analysis shall be clearly but concisely written and demonstrate your thought process and steps used to analyze the problem. Specifically address each of the following points:

Inputs:

  • Description
  • Data type
  • Variable names of your choice
  • Validation criteria (what character strings will be accepted?)

Outputs:

  • Description. Describe the outputs to be produced in cases of valid inputs and in cases of invalid inputs.
  • Data types, if applicable
  • Variable names of your choice, if applicable

How outputs will be obtained from the inputs:

  • Description
  • Applicable formulas

B. Design Requirements

Specifically address each of the following points:

  • Modular structure of the program, presented as a hierarchy chart (see Figure 3.8 on page 148 for a sample)
  • Clear verbal description of the tasks to be accomplished in each module
  • Flowcharts for each subordinate module (No flowchart is required for the main module)
  • Complete pseudocode for the program. The pseudocode shall pass all applicable tests of the Pseudocode Checklist, and shall contain appropriate and informative comments.

C. Test Case Requirements

Provide four different test cases, presenting the inputs and required outputs for each case, and the resulting action of the program. Include two cases of invalid inputs

Submission Requirements:

Save your completed assignment as a document and attach it to your assignment in your Assignment Folder. Do not copy the contents of the document into the edit window of the assignment folder. Your document must be neat and well-written with zero grammar, usage, and spelling errors. Provide your name on the first page along with the class/section, professor and due date. Provide page numbers at the bottom of each page. Single or space-and-a-half formatting is acceptable. Give your file a name that begins with your LAST name.

An example template file HW3_template.doc containing the required sections is attached along with these instructions. You are strongly encouraged to use this document to start your writing and fill in all of the details required.

Grading Criteria for Assignment 3

Here is the chart that I will use in grading Assignment 3. Absent items will be graded as zero.

Aspect / Weight (%) / Grade
Grammar, spelling, and usage, and neatness and consistency of presentation / 10
Analysis (16%)
Inputs: description, variable names, data types / 4
Validation criteria for each input / 4
Outputs: description, variable names, and data types / 4
How outputs obtained / 4
Design (54%)
Hierarchy chart / 5
Descriptions of the tasks of each module / 7
Flowcharts for modules / 15
Pseudocode - validity (checklist) / 10
Pseudocode - correctness / 12
Pseudocode - comments / 5
Test Cases (20%)
Inputs (valid) and expected outputs / 10
Inputs (invalid) and expected outputs / 10
Total / 100