Lesson 7 assignment  – Working with a Decision Structure Objectives: Use an Input, Processing and Output (IPO) chart to create a flowgorithm program meeting customer requirements Use a Decision structure to determine which calculation to use Lab Task Checklist It is expected you have read the required reading in this Lesson before starting the lab. Review Course Resources/Rules of Engagement (ROE) and Standards/ROE: Programming/Flowgorithm Programs Review Course Resources/Flowgorithm Guidance/Menu Guidance Create the Flowgorithm program to meet customer requirements Ensure you have test cases reflected in the comments File naming Convention: “lastname-asgn7.fprg”. **where lastname is YOUR lastname and the filename uses only small letters…no capitals. Submit all required lab files to Blackboard Instructions: Review the customer requirements and IPO found below: The customer needs to determine what the shipping costs will be for a package. The shipping cost is determined by weight.  Once the weight is entered the program should display the rate used and the total shipping charges.  Weight of Package Rate per Pound 2 lbs or less 1.00 Over 2 but not more than 6 lbs 2.25 Over 6 but not more than 10 lbs 3.50 Over 10 lbs 4.10   ·         personal message (i.e., not just the fee). ·         Display a message for end of program and programmer credits ·         Display a message with customer information (customer name and account number)       Open Flowgorithm and save with the required naming conventions in the “Lab Task Checklist” and remember to enter your Program Attributes. Create the algorithm using Flowgorithm to meet the customer requirements. Display a welcome message and the purpose of the program Reserve Memory Locations (Declare) - Use as short and meaningful names Variables - Declare variables close to where they will be used Use the correct naming conventions (found in ROE) Named constants - Declare named constants at the start of the program Use the correct naming conventions (found in ROE) Use named constants for each of the different rates. Once rate is determined set the rate to that value. Example: rate = RATE1 Make sure you are using the correct data type Add Decision Structures as needed to meet customer requirements. Use prompts to describe required input before asking for input The output must clearly delineate what each value is. Display end of program message with programmer’s name Document your test cases using the comment block of flowgorithm SPECIAL NOTE: Do not use magic numbers when named constants are a better choice. i.e., #cost of tickets, TAX rate, fee charges, test for fee.  Make sure your calculation uses the NAMED CONSTANTS instead of actual numbers. Input, Processing and output (ipo)   Input Processing Output Constants: Rates for: ·         More than 10 ·         More than 6 less than 10 ·         More than 2, less than 6 ·         Equal or Less than 2 Variables: Package weight     Get package weight Assign each rate for shipping   Test for rate to be charged Set rate to rate to be charged (hint: your constants)   Calculate shipping total ·         Shipping total = rate * weight  **hint: The order that you test matters. Welcome message Prompt: weight   Result: Rate charged and total shipping cost   End of Program message         Storage/Memory Location       Test Data T1: W= 2 rate = 1 total = 2 T2: w= 5 rate = 2.25 total = 11.25 T3: W= 6 rate = 2.25 total = 13.50 T4: W= 7 rate = 3.50 total = 24.5 T4: W= 10 rate = 3.50 total = 35.00 T5: W= 12.3 rate = 4.10 total = 49.2

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Lesson 7

assignment  – Working with a Decision Structure

Objectives:

  • Use an Input, Processing and Output (IPO) chart to create a flowgorithm program meeting customer requirements
  • Use a Decision structure to determine which calculation to use

Lab Task Checklist

  • It is expected you have read the required reading in this Lesson before starting the lab.
  • Review Course Resources/Rules of Engagement (ROE) and Standards/ROE: Programming/Flowgorithm Programs
  • Review Course Resources/Flowgorithm Guidance/Menu Guidance
  • Create the Flowgorithm program to meet customer requirements
  • Ensure you have test cases reflected in the comments
  • File naming Convention: “lastname-asgn7.fprg”. **where lastname is YOUR lastname and the filename uses only small letters…no capitals.
  • Submit all required lab files to Blackboard

Instructions:

  1. Review the customer requirements and IPO found below:

The customer needs to determine what the shipping costs will be for a package. The shipping cost is determined by weight.  Once the weight is entered the program should display the rate used and the total shipping charges. 

Weight of Package

Rate per Pound

2 lbs or less

1.00

Over 2 but not more than 6 lbs

2.25

Over 6 but not more than 10 lbs

3.50

Over 10 lbs

4.10

 

·         personal message (i.e., not just the fee).

·         Display a message for end of program and programmer credits

·         Display a message with customer information (customer name and account number)

 

 

 

  1. Open Flowgorithm and save with the required naming conventions in the “Lab Task Checklist” and remember to enter your Program Attributes.
  2. Create the algorithm using Flowgorithm to meet the customer requirements.
    1. Display a welcome message and the purpose of the program
    2. Reserve Memory Locations (Declare) - Use as short and meaningful names
      1. Variables - Declare variables close to where they will be used
        1. Use the correct naming conventions (found in ROE)
      2. Named constants - Declare named constants at the start of the program
        1. Use the correct naming conventions (found in ROE)
        2. Use named constants for each of the different rates. Once rate is determined set the rate to that value. Example: rate = RATE1
      3. Make sure you are using the correct data type
    3. Add Decision Structures as needed to meet customer requirements.
    4. Use prompts to describe required input before asking for input
    5. The output must clearly delineate what each value is.
    6. Display end of program message with programmer’s name
    7. Document your test cases using the comment block of flowgorithm

SPECIAL NOTE:

Do not use magic numbers when named constants are a better choice. i.e., #cost of tickets, TAX rate, fee charges, test for fee.  Make sure your calculation uses the NAMED CONSTANTS instead of actual numbers.

Input, Processing and output (ipo)

 

Input

Processing

Output

Constants:

Rates for:

·         More than 10

·         More than 6 less than 10

·         More than 2, less than 6

·         Equal or Less than 2

Variables:

Package weight

 

 

Get package weight

Assign each rate for shipping

 

Test for rate to be charged

Set rate to rate to be charged (hint: your constants)

 

Calculate shipping total

·         Shipping total = rate * weight

 **hint: The order that you test matters.

Welcome message

Prompt: weight

 

Result: Rate charged and total shipping cost

 

End of Program message

 

 

 

 

Storage/Memory Location

 

 

 

Test Data

T1: W= 2 rate = 1 total = 2

T2: w= 5 rate = 2.25 total = 11.25

T3: W= 6 rate = 2.25 total = 13.50

T4: W= 7 rate = 3.50 total = 24.5

T4: W= 10 rate = 3.50 total = 35.00

T5: W= 12.3 rate = 4.10 total = 49.2

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 7 steps with 7 images

Blurred answer
Knowledge Booster
Module hierarchy chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY