A VB Assignment Statement
How To Solve Programming Problems
This reading will help you solve the programming problems you will do in the weekly discussions. Please read it
thoroughly before making your first post in the threaded discussions which require you to solve programming word
Input, Output and Processing
All programs accept data in the form of input, alter that data through calculations or some form of processing, and
then display the results to the user as output.
Problems which require the program to “Get” information, “Ask” the user for information, or “Prompt” the user
represent input steps.
Processing happens in the form of instructions or “code” which the programmer writes the program. Processing
usually refers to mathematical calculations or making decisions, such as deciding if a person qualifies for a credit
Problems which indicate the program must “Calculate”, “Convert”, “Determine”, “Multiply”, “Add” or
perform other calculations are referring to processing.
Output can take a number of forms, such as information displayed to the user on the computer screen, and print-out
of some kind, or data written to a database for a file. Problems which require the program to “Display” or “Print”
information are output steps.
Programmers often use Input, Processing and Output (IPO Charts) to organize the data that goes into a program, the
processing that must occur, and the data that goes out; this helps them understand the problem.
Later, it helps them
design the VB form with which the user will interact.
Here is a sample problem, and a corresponding IPO Chart.
Calculating Day Care Expense
Write a program that
the number of weeks in the summer and the amount you have to pay for child care in each
week (assume the amount of is the same for each week).
Then the program
the number of weeks by the
amount of child care you have to pay, arriving at the total daycare expense for the summer.
Then the program
the total daycare expense to the user.
IPO Chart Solution
Number of Weeks
Weekly ChildCare Expense
Multiply the Number of weeks by
the weekly childcare expense
Total Childcare Expense
This program has two inputs – number of weeks, and the childcare amount.
These steps are considered input
because they are preceded by the keyword “Gets” in the problem statement.
The processing is simply multiplying
the weeks by the amount, suggested by the word “multiplies” in the problem statement.
The output is simply the
total daycare expense, indicated by the word “displays”.
In the threads, you can also represent the IPO chart this way: