CIS II5- 6202 5
TEXTBOOK LECTURE 2
Hello Class,
It was good to meet all of you in class and hope the materials presented is slowly but surely sinking in. With this I would like to summaries what we had discussed about in these threads, text, live lecture, online e-lecture. We covered...
It was good to meet all of you in class and hope the materials presented is slowly but surely sinking in.
With this I would like to summaries what we had discussed about in these threads, text, live lecture,
online e-lecture. We covered a lot of information this week. We looked at Chapter 1, 2 and 3.
In Chapter 1, we looked at the steps in program development. The main key is "Understand the
problem", only when you understand the problem can you then find a solution. A question that is asked,
how much time should I spend doing a program. Programming can become time consuming if you do not
follow my suggestion. As the program become more elaborate use this rule. The basic rule is for you to
spend at least 70% of your time on paper and then 30% on the computer. The more you put down on
paper the less frustrating it gets in the long run. Some students take this advise and some don't, hence
the frustration, the stress and you tend to spin your wheels and head nowhere. The steps I take are
usually 1. IPO 2. Pseudocode/Flowchart 3. Visual Basic
Using the same analogy, think about building a new house. The first thing you do is decide how many
rooms you want, how big the house should be, and the basic layout of the floor plan – this is the analysis
activity where you determine "what" needs to be done. Then, an architect takes the basic floor plan and
creates a detailed design or blueprint of the house, which shows the exact measurements – this is the
design, or "how" it will be done. Establishing what you need to do and then determining how you are
going to do it must be correctly completed before you start building the house. This is as true for building
a house as it is for building a software application, game, or website. So, before you learn how to do any
programming, you need to learn how to analyze the requirements and create the logic and design that is
used to construct the application. Just like when you build a house, you cannot build a program without
a blueprint! (This blueprint is the Pseudocode). Remember what you will take with you to the next class
(CIS170) is the Pseudocode and NOT the flowchart. Now let’s look at some definitions.
An information system (abbreviated as “IS”) is a special type of system that collects data and transforms
it into information that is usable by human beings. Data is a collection of numbers and characters that
represents something. What it represents may not be obvious to a human being. The goal of the
information system is to convert this data into a format the can be understood by a person. This
understandable format is known as information.
,An information system performs three basic functions:
1. Input data into the system
2. Process the data to create meaningful information
3. Output the information for the user
These three basic functions (often abbreviated as IPO) also appear in computer programs.
An example, a basic layout of a Point-of-Sale (POS) system, which you often see at the checkout points in
a store. These systems input stock identification numbers (often from bar codes), retrieve prices from a
database, and produce a receipt for the customer.
A program is a set of instructions that tells a computer how to perform a task. (A solution to a problem)
The logic behind the program is known as an algorithm. Algorithms can be coded into computer
programs using various programming languages, such as Visual Basic, C# (read “C Sharp”), C++, Java, etc.
Algorithms are generally presented using either flowchart or pseudocode.
A flowchart is a graphical representation of an algorithm. We used different symbols to identify different
types of instructions. Pseudocode is an English-like language that can be used to present an algorithm as
a list of instructions. You can see that there is a close tie between what is diagrammed in the flowchart
and what is written in pseudocode.
The flowchart symbols used are
,1. Parallelogram for Inputs (whenever you want to input data to the computer) and Outputs (whenever
you want to output data from the computer).
2. Rectangle for process (whenever the computer is going to perform an internal process that requires
no user input, such as a calculation).
3. Lines show the flow (the arrowhead shows the direction of the flow of logic).
So what are the advantages and disadvantages of Flowcharts vs Pseudocode
Advantages of Flowcharts: you can “see” the flow of the logic
Disadvantages of Flowcharts: Limited by the size of symbols and you must learn the proper symbols.
Advantages of Pseudocode: No symbols to learn. Also allows you to write as little or as much detail as
you like.
Disadvantages of Pseudocode: You cannot see the flow of the logic easily.
This week we looked at The Sequence Structure consists of a sequence of instructions that are executed
one after the other. There is only one path to follow. (Start at the top and proceeds downwards)
Assignment statements are used to perform calculation and store the result
In Visual Logic, the assignment flowchart element is a rectangle with a variable on the left hand side
(LHS) and
an expression on the right hand side (RHS). When executed, the expression is evaluated, and the result is
stored into the variable. Mathematical equations do NOT have the same meaning as in programming
expression
, Eg. Answer = Number * 2 and Number * 2 = Answer (are the same as a Mathematical equation but not
so in programming) The second is incorrect in programming.
Variables, is the name given to a collection of temporary memory locations, designed to store a
particular data item. Each variable has two components: its name (which does not change) and its value
(which may change during execution). The values stored in constants cannot change. Variable and
constant names should be unique and descriptive. All variable used in a program must be introduced.
We do this with a Declare statement (done in Pseudocode but not in Visual Logic). Variables and
constants have a name (called an identifier), a data type, and a scope.
It is important that you have a good understanding of variables and the use of it in programming, For this
class, your variables will conform to the following rules:
• Variable names must be one word
– The word may contain letters, numbers, hyphens or any other characters.
– Variable name must start with a letter (eg. R2D2 is allowed)
– NO SPACES!!!
• Variable names must have some meaning
– Meaningful names (x and y are not considered meaningful)
– Use camelCasing notation
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller FLOYYD. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for £11.41. You're not tied to anything after your purchase.