Carter's Castle
Carter's Online Class with PDD Demos and Real Code Demos

Carter's Castle Programming

Objectives: I will be using this site to help with demonstrations for my programming classes as well as any illustrations I am using for Programmer Tutoring. Since most of what I teach is related to Program Design and Development plus Intro to C++ that is where I will start. Then my plans will be to include demonstrations using JAVA with maybe some Visual Basic after all this is up and running. In the end I would like to include some PHP and maybe SQL. Hope this will help you in your studies of programming and set you on a path to much success.

Video Note: My attempt will be to record supporting videos that get right to the point. Short 5 to 10 minute clips that will cover new items of content along with demonstrations that help explain the approach I might use to solve a computing project exercise. Give it a try and don't hesitate to email me if you see suggested corrections, modifications or if you would just like to say thanks for an example you were able to use. (My email is: "gcarter@gwinnetttech.edu").

Topic Areas To Cover

Each item has a menu pick across the top as tab navigators. These topics will be covered by hitting highlights I have found important and then covering programming assignment demos that get into the details of that particular coding technique. I truely believe that if you practice and grow with your efforts you can master the programming skill. Some people can tell right off if they like programming. Some people need a little more time using tools and techniques to help work them into a focused coder. If you benefit from this site or see inprovements you could recommend feel free to email me at objectcoach@aol.com. In the beginning there will be areas that have (UNDER CONSTRUCTION / FUTURE CONTENT YET TO COME). One of my goals will be to have this site complete by the end 2020.

If you are just starting to use Carter's Castle Site please go to the site's last page and complete the survey. The intent is to determine where a participant is coming from. Are you a student? Have you programmed? and other such questions. Make sure you click check answers and then do the email score. Notice that the more points you score the greater benefit you might find by using this site.

(click here to take the survey)

 

  

MOD1 - Welcome Message

MOD1 - Objectives

Welcome 01

Brief Video Intro - a little more.

 

Content Items We Will Explore in Future Modules

A Quick Raptor Demo

Five Steps To Design

Writing Modular Programs

If Statements (Decision Structures)

Loops (Repetition Structures)

Files

Arrays

 

If you can master the above list of programming skills then you should be able to make a living as a programmer.   Why don't you give it a try, then email me on how things turned out. My general email account is objectcoach@aol.com.

Who am I? (last part to my welcome)

Where does the Castle come from?

When did I start using a computer?

The textbook you might be using

Preparing for your first computer program

What you can expect from this training site?

Print Chart

IPO Chart

Hierarchy Chart

Pseudo Code

Flowchart

Feedback for Welcome Message

I really appreciate feedback from people who use my site. Each time you complete a subject from the top it would be great if you could go to the last topic across the top called (Survey). Complete the survey quiz and then send the email request. Thank you for your help.

MOD2 - A Quick Raptor/Flowgorithm Demo

MOD2 - Objectives

Quick Check Link

As you advance your training you need to check to make sure you are ready to move on. You just might want to make the next link connection to take a Pre-test and see if you are ready for our subject. If it goes well you might take the Post-test to see if you are advanced. While you are here you could also look for any solution demonstrations.

(click here for Quick Check Link)

Welcome to Raptor

Watch this clip to get an idea about which tool you might want to use. Mr. Carter can help once you take a peek.

Raptor Install/Overview 

Setting up Raptor is an easy task.

 

Raptor Problem Demonstration #1

You might want a little help on your first Raptor project. I will recomend Raptor Training from Robert Bowers as a great place to start. Bowers has a series of videos on YouTube that are short and to the point. They seam to go well with any flowcharting text book. If you have not seen the first one you might want to watch it first. Then try the very easy Sales Tax program which I will guide you through.

Objectives: This is a project I highlight in my C++ class but will work very well here as an intro to Raptor. We will not be entering any C++ code. We will only look at the planning process which involves flowcharting. Start by watching the 2 Videos produced by the YouTube Host Randall Bowers.

Raptor Intro by Randall Bowers

First watch Video #1

Then watch Video #2

Sales Tax Project by: Gary Carter (a quick demonstration)

More Demos for You (click here MOD2 extended)

Feedback for MOD2 (recently updated)

I really appreciate feedback from people who use my site. Each time you complete a subject from the top it would be great if you could send me feedback. Just email me to say what you like, what you dislike and any corrections you might suggest. You could also let me know if you had your own solution to suggest. My email is (objectcoach@aol.com).

MOD3 - Designing A Program

MOD3 - Objectives

Quick Check Link

This section is usually from a Chapter 2 textbook content section. Take a look at the study helps and quiz to see if you need to spend some time here. If you are not an experienced programmer you may find some items you should spend extra time studying. Once you feel you have mastered this section you should be ready for our next topic of Modules. Modular programming is one of my favorite topics. 

(click here for Quick Check Link)

Vocabulary Critical

Vocabulary Chapters 1 & 2

output

display

storage

memory

design

algorithm

pseudocode

flowchart

literal

constant

IPO chart

sequence

variable

input

terminal symbol

assignment

math operators

declaration

type

initialization

comments

In most textbooks the vocabulary you start with in chapters 1 and 2 may be the most important for your programming efforts. Focus on these terms and it will help more than you could imagine. Items that you are unfamiliar with should be researched and placed in your list of things to remember. Some will be highlighted as we continue in our training.

Four Design Tools

Print Chart (Output Specs)

Program Analysis W/S (IPO Chart)

 

Flowchart (Raptor)

Pseudocode

For the Programmers: Show some Real Code

Take a look at some real code. If you wanted to you could put this code into a C++ or JAVA compiler and it should run.

Solutions Demonstrated with Real Code - For the C++ and JAVA Programmers

C++ - DisplayAge

JAVA - DisplayAge

Feedback for MOD3

I really appreciate feedback from people who use my site. Each time you complete a subject from the top it would be great if you could send me feedback. Just email me to say what you like, what you dislike and any corrections you might suggest. You could also let me know if you had your own solution to suggest. My email is (objectcoach@aol.com).

 

MOD4 - Writing Modular Programs

MOD4 - Objectives

Quick Check Link

As you advance your training you need to check to make sure you are ready to move on. You just might want to make the next link connection to take a Pre-test and see if you are ready for our subject. If it goes well you might take the Post-test to see if you are advanced. While you are here you could also look for any solution demonstrations.

(click here for Quick Check Link)

Vocabulary Critical

Module Vocabulary (could be) Chapters 3

code simplicity

reuse

teamwork

call statement

heirarchy chart

local variables

global variables

variable scope

passing by value

arguments

passing by reference

parameter list

global constants

return value

function

 

 

Modular Programming might take some getting used to. We will start here and add more as we move into future learning modules.

View MOD4 - Demo Tip, Tax, and Total 

If you would like to see the next part to my demonstration series involving a simple restaurant example then click on the link below to get started. Make sure you have seen the MOD3 version first.

Link: (click here for Tip, Tax, and Total MOD4)

View MOD4 - ChangeUs (an Algorithm)

Passing values is not always easy. Check out this demo from the Gaddis book using module argument passing.

Link: (click here for ChangeUs MOD4)

Building Modular Programs

(after watching the intro video you might want to scroll to the bottom of this page to watch an example of program modules)

Why would people build programs that do not use modules?

What happens when people start writing programs after they have design training?

What might encourage the use of modules?

 

What is a modular program?

A modular program is a program that was developed grouping statements that perform similar (specific) tasks together. Each module in a program can contain a few lines of code or may include several lines of code depending on how broad you define the operation being performed.

What are four levels of modules we might tend to use?

1) A simple procedure (might be called a subchart).

  1. Has a name to be called.
  2. Must be called to activate.
  3. Receives no values.
  4. Returns no values.
  5. Designed to only group instructions.
  6. Usually relies on global variables to work with values between module calls.
  7. This is not a data safe module.
  8. This is not a code safe module.

2) A formal procedure.

  1. Has a name to be called.
  2. Must be called to activate.
  3. Can receive multiple values.
  4. Can return multiple values.
  5. Designed to group instructions and share data.
  6. Usually does not rely on global variables to work with values between module calls. The desire is to pass all values from and to the module.
  7. This is a data safe module.
  8. This is not a code safe module.

3) A function.

  1. Has a name to be called.
  2. Must be called to activate.
  3. Can receive multiple values.
  4. Designed to return only one value.
  5. Designed to group instructions and share data.
  6. Usually does not rely on global variables to work with values between module calls. The desire is to pass all values needed to the module and return only one value.
  7. The function call can be embedded in a mathematical formula.
  8. This is a data safe module.
  9. This is not a code safe module.

4) A method.

  1. First a method must be part of an OBJECT.
  2. Has a name to be called.
  3. Must be called to activate.
  4. Can receive multiple values.
  5. Designed to return only one value.
  6. Designed to group instructions and share data.
  7. Usually does not rely on global variables to work with values between module calls. The desire is to pass all values needed to the module and return only one value.
  8. The method call can be embedded in a mathematical formula.
  9. This is a data safe module.
  10. This is a code safe module.

Raptor allows what module types?

 

Raptor Examples

1) Demo Raptor using 3 modules to show how modules can operate with a global approach to variables.

2) Demo Raptor using modules that are passed values to accomplish a specific task.

 

Feedback for MOD4

I really appreciate feedback from people who use my site. Each time you complete a subject from the top it would be great if you could send me feedback. Just email me to say what you like, what you dislike and any corrections you might suggest. You could also let me know if you had your own solution to suggest. My email is (objectcoach@aol.com).

 

MOD5 - If Statements or Decision Structures (Decisions)

MOD5 - Objectives

Quick Check Link

As you advance your training you need to check to make sure you are ready to move on. You just might want to make the next link connection to take a Pre-test and see if you are ready for our subject. If it goes well you might take the Post-test to see if you are advanced. While you are here you could also look for any solution demonstrations.

(click here for Quick Check Link)

Vocabulary Critical

Decision Vocabulary (could be) Chapter 4

diamond

Boolean Expressions

relational operators

if

then

else

single alternative

dual alternative

else if

nested decisions

case structure

logical and

logical or

logical not

boolean variable

The decision chapter could be your most important chapter. Could also be the most difficult. Flowcharting helps so much.

Objective Statement of Fact

The Decision Structure is going to help you give versatility to your program. You will be able to direct instruction to execute some commands and skip others. It is almost like a program that can think. Let's see what we can build.

Color Mixer Project:

We are going to take a look a project from the Gaddis, Program Design & Development book (Chap 4). This project is also in the Gaddis C++ text (Chap 4). Take a look at the project assignment and see what you can do with it. I will review the project requirement first, making some highlights. Then I will look at a very simple Program Analysis Worksheet along with a Hierarch Chart. Finally I will give a 2 part review of an acceptable flowchart. Try your effort first and then watch the videos would be my recommendation.

 

Analyze the Project

Analyzing a project is where the wheels start turning. This looks like a very simple project when you first take a look. Then you might consider whether there is a good way and a not so good way to approach the solution. See what you think.

Start the Design with a Program Analysis Worksheet and a Hierarchy Chart

Designing a program may not start out so exciting. Many people want to skip the initial planning. To get this going right you may need to force your effort into the planning stage rather than jump right into trying to build a program.

Now for the Flowchart

The first segment covering the flowchart is a partial item where I will get things started (Part 1). If you have not started you might want to watch this piece on Raptor and then give it your best effort. Wait on watching Parts 2 and 3 till you have at least tried Part 1. Then you could determine if clean-up is needed when you move forward.

(for flowchart demo videos you might want to enlarge to full screen)

Part 1

 

Part 2

Part 3 

 

Feedback for MOD5

I really appreciate feedback from people who use my site. Each time you complete a subject from the top it would be great if you could send me feedback. Just email me to say what you like, what you dislike and any corrections you might suggest. You could also let me know if you had your own solution to suggest. My email is (objectcoach@aol.com).

 

MOD6 - Repetition Structures (Loops)

Objectives:

The Looping Structure is going to help you give repetition to your program. You will be able to repeat areas of code and start the development of complex solutions. Let's see what we can build.

Quick Check Link

This section is usually around Chapter 5 in popular textbooks. Take a look at the Quick Check Link to see if you need to spend extra time here.

As you advance your training you need to check to make sure you are ready to move on. You just might want to make the next link connection to take a Pre-test and see if you are ready for our subject. If it goes well you might take the Post-test to see if you are advanced. While you are here you could also look for any solution demonstrations.

(click here for Quick Check Link)

Vocabulary Critical

Looping Vocabulary for most Textbooks

condition

while loop

for loop

do until loop

pretest

infinite loop

counter loop

iterations

increment

decrement

accumulator

sentinel value

variable

input

terminal symbol

posttest

flag

end while

end for

++ operator

-- operator

 

Introduction to Loops 

One of the most important things you can do with your computer is to repeat an action. We have several ways to describe this process.

Let's talk about a few of the highlights:

Look over your study text and become familiar with the terminology. Then you will be ready to attempt a couple of exercises.

 

Exercise #1 (Bug Collector)

If you are using the text from Tony Gaddis then you can follow along with me (Chapter 5 Programming Exercise #1). You might even want to attempt this exercise before you look at my solution.

Now I'm going to solve the Bug Collector project with the help of our author's video note. Try to watch and see if you can get the same solution I do. I will follow the Gaddis example and use Raptor to give me a runable flowchart.

Carter's Video Solution: Part 1

Carter's Video Solution: Part 2

Carter's Video Solution: Part 3

 

Exercise #2 (Sum of Numbers)

Now let's complete one from scratch. This one is also from the Tony Gaddis chapter on Repition (Chapter 5 Programming Exercise #4).

1) Look over the project.

2) You may want to stop here and see if you can come up with a solution on your own.

3) Setup your version of a Program Analysis Worksheet

4) Solve the problem using Raptor or you might use Flowgorithm

The solution for this project will be included in the Quick Check Link for MOD6. Scroll to the top of this page for a link.

Feedback for MOD6

I really appreciate feedback from people who use my site. Each time you complete a subject from the top it would be great if you could send me feedback. Just email me to say what you like, what you dislike and any corrections you might suggest. You could also let me know if you had your own solution to suggest. My email is (objectcoach@aol.com).

  

MOD7 - Files

MOD7 - Objectives

Quick Check Link

This section is usually from an advanced chapter in your textbook. Take a look at the study helps and quiz to see if you need to spend extra time here. Once you feel you have mastered this section you should have no trouble with our next topic of Arrays. Array programming is one of my favorite topics. 

(click here for Quick Check Link)

Vocabulary Critical

Vocabulary Chapter 10

open

EOF

field

close

file declaration

delete

read

position

control break

write

process

hold variable

random

file loop

break variable

sequential

file name

append

delimiter

record

buffer

In most textbooks the vocabulary you use for files would be considered advanded. Our text uses chapter 10 to give demonstrations of file use. Items that you find unfamiliar with should be researched and placed in your list of things to remember. Some will be highlighted as we continue in our training. Some may vary depending on the programming tools you choose. This section would be considered a basic skills intro for files.

Two Program Demos Using Raptor

Quick Intro to File Chapter

 

 

Figure 10-4: Flowchart for Program 10-1 (Philosophers writing data file.)

Writing data to a file.

Carter's Video Solution: Part 1

Note: Expand the youtube video to full screen for a better view.

Figure 10-7: Flowchart for Program 10-2 (Philosopher reading data file.)

Reading data from a file.

Carter's Video Solution: Part 2

Note: Expand the youtube video to full screen for a better view.

 

Feedback for MOD7

I really appreciate feedback from people who use my site. Each time you complete a subject from the top it would be great if you could send me feedback. Just email me to say what you like, what you dislike and any corrections you might suggest. You could also let me know if you had your own solution to suggest. My email is (objectcoach@aol.com).

 

MOD8 - Arrays

Check How Ready You Are

This section is usually from a later chapter in your textbook called Arrays. Sometimes you may see 2 chapters used to cover this topic. Take a look at the study helps and quiz to see if you need to spend some time here. If you are not an experienced programmer trained in a formal classroom setting you may find some items you should spend extra time studying. Once you feel you have mastered this section you should be ready for our example using Arrays. Raptor can be a very good tool to learn about Arrays. See if you can create a program using the demo below. 

Link: Chapter 8 Review

If you are really energetic you might want to try this quiz.

Link: Chapter 8 Quiz

 

Array Demo

Use this link to demo an Array program (Link: Arrays, click here)

Feedback for MOD8

I really appreciate feedback from people who use my site. Each time you complete a subject from the top it would be great if you could send me feedback. Just email me to say what you like, what you dislike and any corrections you might suggest. You could also let me know if you had your own solution to suggest. My email is (objectcoach@aol.com).

 

 

Other Advanced Programming Projects (Other)

Under construction.

Program Demo Link Page (LinkPg)

Programming Project Tutoring List

Chosen for Demonstrations Purposes

To be Added to Carter's Castle Programming

Started: 04/26/18

 

MOD1 - Welcome Message (Welcome)

1> ABCX (a flowchart demo)

2> Binary to Base 10 and Base 10 to Binary

 

MOD2 - A Quick Raptor/Flowgorithm Demo (FlowDemo)

3> Tip, Tax and Total

 

MOD3 - Designing A Program (Design)

4> Sales Prediction

5> Land Calculation

 

MOD4 - Writing Modular Programs (Modular)

6> Kilometer Converter

7> Stadium Seating

8> Rectangle Area (Chapter 6)

 

MOD5 - If Statements/Decision Structures (Decision)

9> Areas of Rectangles

10> Color Mixer

 

MOD5b - More Decisions (an advanced look)

11> Software Sales

12> Shipping Charges

13> Book Club Points

 

MOD6 - Repetition Structures (Loops)

14> Bug Collector

15> Sum of Numbers

16> Largest and Smallest

 

MOD7 - Files (Files)

17> File Display

18> Sales Report

 

MOD8 - Arrays (Arrays)

19> Total Sales

20> Lottery Number Generator

21> Charge Account Validation

22> Payroll

23> Tic-Tac-Toe

24> Sorted Golf Scores

25> Sorted Names

 

MOD9 - Other Advanced Programming Topics and Projects (Other)

26> Prime Number List (chapter 6)

27> Rock, Paper, Scissors Game (chapter 6)

28> Slot Machine Simulation (chapter 6)

29> Payroll Program with Input Validation (chapter 7)

30> Rock, Paper, Scissors Modification (chapter 7)

31> Interest Earned (3 step program exercise)

32> Present Value (Converting a math formula to a Programming Statement)

33> Sales Tax (Chapter 2 & 3 easy)

 

 

 

Site Survey

You can take the Site Survey at anytime and as many times as you would like to give an update. This simply gives a status change for your use of Carter's Castle Site.

(click here for the Main Site Survey)