ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 2 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 29 Apr 2017 My Price 11.00

Flowgorithm SDEV 140 / Introduction to Software Development

Flowgorithm

SDEV 140 / Introduction to Software Development

S07 Flowgorithm Assignment / Chapter 7: Input Validation (15 points)

(From Programming Exercise 2, page 281)

INTRODUCTION: Download this document (S07 Flowgorithm Assignment.docx) from Blackboard, save it on your computer (in a folder that you can easily locate), and then open it in Word.

PREREQUISITE: You need to have the Flowgorithm program installed. Refer to S02 Flowgorithm Assignment if you have not done this already.

TASKS: This assignment is taken from Programming Exercise 2 on page 281 in Chapter 7 of the textbook. In this program, you will:

  • Create a Flowgorithm program from a problem description
  • Ask the user for the number of tickets sold in three different sections
  • Validate that the number of tickets does not exceed the number of seats for each section
  • Multiply the number of tickets sold times the cost for tickets in each section, add the totals for the three sections, and display the total amount of income from the ticket sales.

ASSIGNMENT: Start Flowgorithm, and then do the assignment outlined in step 2. Save the Flowgorithm file on your flash drive or PC as S07.fprg. Submit the Flowgorithm file in Blackboard.

  1. Create a Flowgorithm program as follows:
    1. Enter the required comment lines for Author, Date and Description.
    2. Declare Integer variables for number of tickets ordered, and the maximum number of tickets available in Section A, Section B, and Section C. Assign values for the maximum tickets in each section. Declare Real variables for the cost of tickets in Sections A, B and C, and assign values for those costs. Declare a Real variable for the total sales, and initialize it to 0.
    3. Ask the user for the number of tickets sold in Section A, and use a validation loop that iterates if the number entered is less than 0, OR greater than the maximum available for Section A. (You can use the word OR, or two vertical bars || ). Inside the loop, display an error message telling the user to enter a number between 0 and the maximum for that section, then prompting them again. (You can copy and paste the Output prompt and Input shapes just above the loop.)
    4. On the False branch of the loop, multiply the number of tickets ordered by the cost of tickets for that section, and add that amount to the total sales.
    5. Repeat steps c and d for Sections B and C. You can use Copy and Paste for your loops and calculations, but be sure to edit references from Section A to apply to Sections B and C.
    6. Save the file as S07.fprg.
    7. Run the program. The program should ask you to enter the number of tickets sold in Sections A, B and C. If any number is less than 0, or higher than the maximum number of tickets for that section, an error message is displayed until a valid number is entered. The program then displays the total amount of income from tickets sales. If there are any errors, recheck the instructions and correct them, then resave the file.
  2. Submit the Flowgorithm file S07.fprg by clicking on the View/Complete Assignment link in Blackboard, and attaching the file.DEBUGGING THE PROGRAM: One of the greatest skills a programmer can develop is debugging, which means locating and fixing errors in a program. Email your instructor and ASK QUESTIONS if you are having trouble. Please attach your Flowgorithm file (S07.fprg) to your email.CHECKLIST FOR SUBMITTING THE ASSIGNMENT:
  • You have tested the Flowgorithm program (S07.fprg) and it works correctly
  • Then, Attach the Flowgorithm file (S07.fprg) and Submit it through Blackboard

Answers

(11)
Status NEW Posted 29 Apr 2017 05:04 AM My Price 11.00

-----------

Not Rated(0)