PRG/211 Algorithms and Logic for Computer Programming

PRG/211 ENTIRE CLASS     PRG/211 ENTIRE CLASS

PRG/211 WEEK 1
PRG/211 WEEK 1
PRG/211 WEEK 1

PRG/211 Week 1

 

Individual: University Project: Problem Solving with Algorithms

Includes Working Visual Logic Flowchart!

Also includes Steps (Algorithm), Pseudocode, and Visual Logic flowchart file!

During this course you will design a program for a state university. The university needs a website design that will enable students to order books online. Each week you will receive additional instructions for the elements of the design based on the needs of the university. The elements will correspond with the concepts and skills you learn that week.
According to the university's website design request, students need to order five books, one for each of the five required courses that all students take. You need to design a program that will prompt students for the price of each book and display the total cost for the five books.

Create a 1- to 1 3/4-page document listing the steps needed to solve the problem using an algorithm, including the following:
    • Identify the input needed
    • Define what the input must do (i.e., the process)
    • Show what the output must produce
Create a 1/2- to 1-page document of your pseudocode based on the algorithm, including the following:
    • Write the pseudocode statement(s) for the input
    • Write the pseudocode statement(s) for the process
    • Write the pseudocode statement(s) for the output
Create a 1-page flowchart based on the algorithm, including the following:
    • Mark the program's starting point
    • Represent the input steps in the program
    • Represent the process steps in the program
    • Represent the output steps in the program
    • Mark the program's ending point
Submit your assignment using the Assignment Files tab.

 

 

Lab 1.5:  Input, Processing, and Output

Lab 1.5 – Programming Challenge 1 – Team Average

Includes Algorithm, Pseudocode, Python Code, and Flowchart Visual Logic file!

Write the Algorithm, Pseudocode, Flowchart, and Python code for the following programming problem. Team Average  A college wants you to write a program for them that will calculate the average number of wins for their football team over the past five years.  The user of the program should be able to enter the number of wins each year.  The program will calculate the average number of wins during that five year period and display that information to the screen. 

 

NOTE: Discussion Questions are different depending on which Instructor you have, however the following questions have been included as a BONUS for this tutorial.

 

Discussion Question: Algorithms

Consider a potential business problem that would require a computer program solution. Discuss how an algorithm might be used to solve a problem that a business may encounter.

 

Supporting Activity: Additional Discussion Questions

1.  Why is a flowchart useful in developing and documenting software?

2.  Why is the interactive Visual Logic flowchart program more useful than a

      manually drawn flowchart?

3.  Is a flowchart more valuable in documenting the logic of a program than just

      the coded instructions in the programming language? Explain your answer.

4.  What are the similarities and differences between procedures and objects?

5.  What is an example of software that would be best implemented in procedural

      programming?

6.  What is an example of software that would be best implemented in object-

      oriented programming?

 

PRG/211 WEEK 2
PRG/211 Tip Tax and Total
PRG/211 Learning Team Collaboration Debugging
PRG/211 WEEK 2

PRG/211 Week 2

 

Individual: University Project: Using Selection and Iteration I

Includes Working Visual Logic Program File!

Also includes Steps (Algorithm), Pseudocode, Screenshot of working program, and Visual Logic flowchart!

The university reassessed its needs for the website design and determined it will no longer require all students to take five classes.
Update the website program to reflect the following changes:
    • Prompt the student for the number of courses being taken
    • Use a while loop to prompt the student for the price of each book based upon

        the number of classes being taken
    • After the price of each book has been entered, prompt the user for shipping

        options: delivery or pick-up
    • Use an if statement to add the charges to the total price if the shipping  

        charges are greater than 0
    • Display the total cost
Create a 1/2- to 1-page document containing pseudocode based on the revised program needs. Add this to the revised program pseudocode from the Week One Individual Assignment, Problem Solving with Algorithms.
Create a 1-page flowchart based on the algorithm for the revised program needs. Add this to the revised program flowchart from the Week One Individual Assignment, Problem Solving with Algorithms.
Submit your assignment using the Assignment Files tab.

 

Individual: Tip, Tax, and Total

Includes Algorithm, Pseudocode, Python Code, and Flowchart Visual Logic file!

Complete the Lab 4-6, "Programming Challenge 1 - Tip, Tax, and Total," of Starting Out with Programming Logic and Design.
Note: You are only required to create the pseudocode for this activity; however, notice how the pseudocode compares to the given Python code for this assignment.
Submit your assignment using the Assignment Files tab.

 

Learning Team Collaboration: Ch. 4, Debugging
Often programmers are asked to find errors in code that has been created previously, and often not by them or anyone currently with the organization.
As a team, complete the "Debugging Exercises" in Ch. 4, "Decision Structures and Boolean Logic," of Starting Out with Programming Logic and Design.
Discuss the errors your team found. How could these errors be avoided?

 

NOTE: Discussion Questions are different depending on which Instructor you have, however the following questions have been included as a BONUS for this tutorial.

 

Supporting Activity: Flowcharts

Explain what is meant by a modular approach to programming. Why is this approach important?

 

Supporting Activity: Flowcharts

What challenges did you encounter when creating your first Visual Logic flowchart?

How can the Visual Logic program be used to determine the effect a single grade (such as a B or C) will have on your grade point average (GPA)?

 

PRG211 Yum Yum Burger Joint
PRG/211 University Project: Using Selection & Iteration II
PRG/211 WEEK 3

PRG/211 Week 3

 

Individual: Yum Yum Burger Joint
Complete the Lab 5-5, "Programming Challenge 1 - Yum Yum Burger Joint," of Starting Out with Programming Logic and Design .
Note: You are only required to create the flowchart for this activity; however, notice how the pseudocode compares to the given Python code for this assignment.
Submit your assignment using the Assignment Files tab.

 

Individual: University Project: Using Selection and Iteration II

Includes Working Visual Logic Program File!

Also includes Steps (Algorithm), Pseudocode, Screenshot of working program, and Visual Logic flowchart!

The university would like to remind students to pick-up their books at the bookstore if they choose not to have books delivered.
Revise the website program to reflect the following changes:
    • Prompt the student for the number of courses being taken
    • Use a for loop to prompt the student for the price of each book based upon the

        number of classes being taken
    • After the price of each book has been entered, display the total price of the

        books
    • Prompt the user for the following shipping options: delivery or pick-up

    • Use an if-then-else statement to add the charges to the total price if the

         shipping charges are greater than 0
    • If there are shipping charges, display the total charges and shipping date
     • If there are no shipping charges, display the total charges and a message

         indicating that the books can be picked up at the bookstore
Create a 1/2- to 1-page document containing pseudocode based on the revised program needs.
Create a 1-page flowchart based on the algorithm for the revised program needs.
Submit your assignment using the Assignment Files tab.

 

NOTE: Discussion Questions are different depending on which Instructor you have, however the following questions have been included as a BONUS for this tutorial.

 

Supporting Activity: Alternative Structures

What are the similarities and differences between single alternative structures, dual alternative structures, and case structures? Provide an example of one of the three control structures using psuedocode. Try to provide an example that has not already been posted.

 

Supporting Activity: Iteration Structure

What is an iteration structure? What problem does a repetition structure solve?

 

PRG211 WEEK 4 University Project Using Arrays
PRG211 Going Green
PRG/211 WEEK 4
PRG/211 WEEK 4

PRG/211 Week 4

 

Individual: University Project: Using Arrays

Option 1: Includes Flowchart and Pseudocode

Option 2: Includes Flowchart and Pseudocode

NOTE: Visual Logic Program not included in Week 5 tutorials.

The university updated its website program design request with a few more features to fit its needs.
Update the website program to reflect the following changes:
    • Use an array to prompt the user to enter a credit card account number
    • Use the sequential search algorithm to locate the credit card number entered

        by the user
    • If the credit card number is not in the array, display a message indicating the

        number is invalid
    • If the credit card number is in the array, display a message indicating the credit

        card number is valid
Create a 1/2- to 1-page document containing pseudocode based on the revised program needs. Add the pseudocode statements to the existing pseudocode program.
Create a 1- to 2-page flowchart based on the algorithm for the revised program needs. Add the flowchart structure in the existing flowchart for the program.
Submit your assignment using the Assignment Files tab.

 

Individual: Going Green
Complete the Lab 9-5, "Programming Challenge 1 -- Going Green," of Starting Out with Programming Logic and Design.
Note: You are only required to create the flowchart for this activity; however, notice how the pseudocode compares to the given Python code for this assignment.
Submit your assignment using the Assignment Files tab.

 

NOTE: Discussion Questions are different depending on which Instructor you have, however the following questions have been included as a BONUS for this tutorial.

 

Supporting Activity: Arrays and ArrayList

What is the difference between arrays and ArrayList? What are the advantages and disadvantages of an ArrayList, and when should you use an ArrayList over a simple array?

 

Supporting Activity: String and StringBuilder
What is the difference between string and StringBuilder? What are the advantages and disadvantages of a StringBuilder, and when should you use a StringBuilder over a simple String?

 

 

PRG211 WEEK 5
PRG211 WEEK 5
PRG/211 WEEK 5

PRG/211 Week 5

 

Individual: University Project: Using Files
Option 1: Includes Flowchart and Pseudocode

Option 2: Includes Flowchart and Pseudocode

NOTE: Visual Logic Program not included in Week 5 tutorials.
For completion of the program, use arrays and files.
Instead of prompting the user for the prices of the book, update the website program to reflect the following changes:
    • Read the prices into an array from a file using a loop
    • Use a second loop to sum the values stored in the array after the prices of all

        the books have been read
    • Write the content of the array to a second file
Create a 1/2- to 1-page document containing pseudocode based on the revised program needs. Replace the pseudocode statements in the existing pseudocode program.
Create a 1- to 2-page flowchart based on the algorithm for the revised program needs. Replace the flowchart structure in the existing flowchart for the program.
Submit your assignment using the Assignment Files tab.

 

 

NOTE: Discussion Questions are different depending on which Instructor you have, however the following questions have been included as a BONUS for this tutorial.

 

Supporting Activity: Direct and Random Access
In which situations would you choose to use a direct access or random access file instead of a sequential access file? Give a specific example and explain your reasoning. 

 

Supporting Activity: Data Hiding
Explain the term data hiding, which is used in object-oriented programming. Is data hiding a valuable security consideration? Why or why not?