What to Submit: Pseudocode, table of test cases, completed Certificate of Originality
This is an assignment that requires both pseudocode and a table of test cases.
First, you will be writing the pseudocode for a program that prompts the user to enter the x-coordinate and the y-coordinate of any point on the coordinate plane. (Note: If you do not remember the coordinate plane from elementary geometry and how points are defined on it, please refer to Worksheet G under the “Worksheets” thread in the Course Materials Forum, which will provide a review.) Depending on the coordinates the user enters, you must use a selection control structure to determine the output to display to the user in the following manner:
- If the x-coordinate is greater than 0 and the y-coordinate is greater than 0, you will display to the user that the point is in Quadrant 1.
- If the x-coordinate is less than 0 and the y-coordinate is greater than 0, you will display to the user that the point is in Quadrant 2.
- If the x-coordinate is less than 0 and the y-coordinate is less than 0, you will display to the user that the point is in Quadrant 3.
- If the x-coordinate is greater than 0 and the y-coordinate is less than 0, you will display to the user that the point is in Quadrant 4.
- If the x-coordinate equals 0 and the y-coordinate equals 0, you will display to the user that the point is the origin.
- If the x-coordinate equals 0 and the y-coordinate does not equal 0, you will display to the user that the point is on the y-axis.
- If the y-coordinate equals 0 and the x-coordinate does not equal 0, you will display to the user that the point is on the x-axis.
Please read the program description above carefully so that you know exactly what the program is supposed to do. Understanding the problem is part of the programming process. Follow the program requirements precisely. As stated in the Instructor Policies, your pseudocode must conform to the syntax and style of the pseudocode examples in our textbook.
Second, you will be writing a table of input values and expected output values that will thoroughly test your program. A minimum of seven test cases will be needed to cover all of the possible output conditions. Use the table below, and the first couple test cases have already been filled in for you:
|
User Input
|
Expected Output
|
Comments
|
|
x=4, y=3
|
The point you entered is in Quadrant 1. |
Test case for point in Quadrant 1
|
|
x=-6, y=4
|
The point you entered is in Quadrant 2. |
Test case for point in Quadrant 2
|
Grading Rubric:
|
Assignment: Quadrant of a Point |
Due: Sunday (Day 7) |
||
|
|
Available Points |
Points Earned |
Comments
|
|
All required variables are properly declared before use and then used consistently as declared |
8 |
|
|
|
The correct input is obtained from the user and properly stored in variables |
8 |
||
|
The program uses a selection control structure to determine the quadrant of the point, whether the point is the origin, or whether the point lies on the x-axis or y-axis |
10 |
||
|
The correct message is properly displayed to the user |
7 |
||
|
Listed correct test cases for the program including input, expected output, and comments for each test case |
7 |
|
|
|
Late Penalty 20% (1 day maximum) |
|
|
|
|
Total |
40 |
|
|
|
Additional Comments: |
|||


0 comments