# Computational Thinking for Information Technology

## Presentation on theme: "Computational Thinking for Information Technology"— Presentation transcript:

Computational Thinking for Information Technology

STUDENT SCENARIO: Program design project

OBJECTIVES [STILL NEED OBJECTIVES]
HOME | OBJECTIVES | OVERVIEW | TASK 1 | TASK 2 | TASK 3 | TASK 4 | TASK 5 | TASK 6 | HELP OBJECTIVES [STILL NEED OBJECTIVES] This course will enable you to develop logical thinking skills, including: Asking probing questions to uncover details of a problem Clearly defining a problem Defining clear success criteria for the project including measurable objectives

Hi, I’m Theresa. I’ll be your guide for this assignment.

PROJECT OVERVIEW You will work on this project for the entire semester adding to the project when you learn a new design skill. You will not design the entire project at one time. You submit one portion of the project at a time.

Your Assignment Create a pseudocode design for a program that will allow students to rent movies. The system will allow students to search the available movie inventory, return a movie and rent a movie. The student information is located using their address. After the student rents the movie, the system will list the movies the student rented and a bill. The student will be prompted to enter their payment information.

The Completed System Will:
HOME | OBJECTIVES | OVERVIEW | TASK 1 | TASK 2 | TASK 3 | TASK 4 | TASK 5 | TASK 6 | HELP The Completed System Will: Store student and movie information. Update the movie inventory. (keep an accurate count of the number of movies available) Bill a customer using the following rules: Students can only rent up to 3 movies at a time If students rent 3 movies, they receive 1 of the three movies for free Each movie costs \$1.50

Billing rules (cont.): A 5% Sales tax is added to the total cost.
HOME | OBJECTIVES | OVERVIEW | TASK 1 | TASK 2 | TASK 3 | TASK 4 | TASK 5 | TASK 6 | HELP Billing rules (cont.): A 5% Sales tax is added to the total cost. If the movie is rated R, the system must verify that the student is 17 years old or older. If the student is under 17, an error message is printed and the movie is removed from the student's list of movies.

For this task, you will create preliminary data files.

Task 1 Overview The first step is to determine the type of input data needed for the movie check-out system. You may learn that you need to add more fields as you continue to work on the problem.

Deliverables Create a sample Customer data file that includes at least 5 records Create headings over the columns Save the file as CustomerData_LastName (where LastName is the your last name)

Deliverables (cont.) Create a sample Movie data file that includes at least 10 records Create headings over the columns Save the file as MovieData_LastName (where LastName is the your last name)

Deliverables (cont.) Create a sample Payment data file that includes at least 5 records Create headings over the columns Save the file as PaymentData_LastName (where LastName is the your last name)

TASK 2: basic design (simple sequence and selection)

Deliverables Create a pseudocode/flowchart design to prompt a student for their Address and the titles of the three movies they want to rent. The problem should display the Student’s address and a total bill. Take into account the data that you created during Task1. Modify the files that you create during Task 1. you need to add more fields to the files.

Action Steps Bill a student using the following rules:
HOME | OBJECTIVES | OVERVIEW | TASK 1 | TASK 2 | TASK 3 | TASK 4 | TASK 5 | TASK 6 | HELP Action Steps Bill a student using the following rules: Students can rent up to 3 movies. If the movie is rated R, the system must verify that the customer is 17 years old or older If the customer is under 17, an error message is printed stating that the customer is not allowed to rent the movie

Action Steps (cont.) Rules (cont.):
HOME | OBJECTIVES | OVERVIEW | TASK 1 | TASK 2 | TASK 3 | TASK 4 | TASK 5 | TASK 6 | HELP Action Steps (cont.) Rules (cont.): Each movie costs \$1.50 A 5% Sales tax is added to the total cost. Save the file as: Simple_Sequence_Selection_SchoolName (where SchoolName is the name of your school)

Good job. Let’s move on!

TASK 3: design for multiple customers (iteration – loop)

Deliverables Modify the pseudocode/flowchart design that you created in Task 2 to include statements to prompt the student to enter the movie titles one movie at a time. After the student has finished entering the movie titles, the system will calculate and print the bill. Hint: use a loop to process the total bill.

Action Steps Add the statement(s) for the following:

Deliverables Modify the pseudocode/flowchart design that you created during Task 3 to include at least the following modules. Enter Student Calculate the Bill Print the Bill After the student has finished entering the movie titles, the system will calculate and print the bill.

Action Steps Create a hierarchy chart for the modules
HOME | OBJECTIVES | OVERVIEW | TASK 1 | TASK 2 | TASK 3 | TASK 4 | TASK 5 | TASK 6 | HELP Action Steps Create a hierarchy chart for the modules Save the hierarchy chart as Hierarchy_Chart_LastName (where LastName is your Last Name) Save the pseudocode/flowchart design using the filename Modules_LastName (where LastName is your Last Name)

Let’s move on to Task #5.

Deliverables Modify the pseudocode/flowcharting design that you created in Task 4 to include at least the following modules: Enter the MovieName into an array named Movies and QuantityonHand into an array named MovieQuantity The information for the movies is stored in the MovieData_LastName file QuantityonHand = -999 when end the file is reached)

Deliverables (cont.) Modify the pseudocode/flowcharting design that you created in Task 4 to include at least the following modules: Update Movie inventory (add to inventory/deduct from inventory) Calculate and print the customer bill Calculate and print the total daily sales Calculate and print the average number of movies rented

Deliverables (cont.) The customer will be prompted to enter their address and whether they want to rent or return a movie. If the student wants to rent a movie, after the customer has finished entering the movie title(s), the system will calculate and print the bill. If the student wants to return a movie, a message is printed on the screen after returning the movie(s)

Deliverables (cont.) Modify the hierarchy chart to include the new modules. Save the hierarchy chart as Hierarchy_LastName Save the pseudocode/flowchart design using the filename Arrays_LastName (where LastName is your last name)

For this task, you will use object-oriented design to design classes.

Deliverables: Part 1 Use object-oriented design to design a class called Customer that will receive the information in the Sample Customer Data file that you created during Task 1 of the project. The class that you create will receive the customer data, validate the data and display the input data.

Action Steps: Part 1 Design the class table
HOME | OBJECTIVES | OVERVIEW | TASK 1 | TASK 2 | TASK 3 | TASK 4 | TASK 5 | TASK 6 | HELP Action Steps: Part 1 Design the class table Write an algorithm for each operation Write a test or driver algorithm to test the solution

Deliverables: Part 2 Use object-oriented design to design a class called Movie that will receive the information in the Sample Movie Data file that you created during Task 1 of the project. The class that you create will receive the movie data, validate the input data and print the valid movie data that have a quantity amount equal to 0.

Action Steps: Part 2 Design the class table
HOME | OBJECTIVES | OVERVIEW | TASK 1 | TASK 2 | TASK 3 | TASK 4 | TASK 5 | TASK 6 | HELP Action Steps: Part 2 Design the class table Write an algorithm for each operation Write a test or driver algorithm to test the solution

Deliverables: Part 3 Use object-oriented design to design a class called Payment that will receive the information in the Sample Payment Data file that you created during Task 1 of the project. The class that you create will receive the payment data, validate the input data and print the data.

Action Steps: Part 3 Design the class table.
HOME | OBJECTIVES | OVERVIEW | TASK 1 | TASK 2 | TASK 3 | TASK 4 | TASK 5 | TASK 6 | HELP Action Steps: Part 3 Design the class table. Write an algorithm for each operation. Write a test or driver algorithm to test the solution When you are done with Parts 1-3, save the file as Objects_LastName (where Last Name is your last name)