Data Processing SS2 Second Term-1
Data Processing SS2 Second Term-1
2ND TERM
CLASS: SSS2
WEEK S TOPICS
5. WORD PROCESSING 2
8. PROGRAM DEVELOPMENT
11. REVISION
12 EXAMINATION
WEEK 2 Date…………………..
Register
This is a special high-speed storage area within the CPU. All data must be represented in a register before it can be
processed, for example, if two numbers are to be multiplied, both numbers must be in registers, and the result
must be placed in register. (The register can contain the address of a memory location where data is stored rather
than the actual data itself.)
Address
An address is used to reference a storage location in main memory. You can think of computer memory as an array
of storage boxes, each of them has an address (a unique number) assigned to it.
Bus
A collection of wires through which data is transmitted from one part of a computer to another. You can think of a
bus as a highway on which data travels within a computer. When used in reference to personal computers, the
term bus usually refers to internal bus. This is a bus that connects all the internal computer components to the
CPU and main memory
Types of Registers
The types of registers are Memory data register (MDR) and Current instruction Register (CIR)
MDR
Read Also
The memory data register is used to hold data or the memory address that contains either the next piece
of data or an instruction that is to be used.
The memory data register acts like a buffer and holds data that is transferred from the memory to the
processor.
The memory data register is used whenever data is being transferred between central processing unit and
main memory.
CIR
Current instruction register is the register, usually in the control unit, that contains the instruction that is
being executed by the CPU.
The CIR stores the instruction currently being executed. In simple processors each instruction to be
executed is loaded into the instruction register which holds it while it is decoded, prepared and ultimately
executed.
DATA-FETCH-EXECUTE CYCLE
Fetch execute cycle is the very basic way a computer works. All commands are executed through the running of
this cycle. The cycle itself has very few commands, however when linked up together it is possible to create a large
program, or even an operating system.
Data processing consists of all activities which are necessary to transform data into information.
Computer data processing is grouped under five basic categories as shown below;
CONVERSION
MANIPULATION
STORAGE
COMMUNICATION
i. Bus Speed
i. Bus Width
ii. Medium of Storage
iii. Data transfer medium
Evaluation
i. Register
i. Bus
ii. Address
Hiit @ School, Computer Studies for Senior Secondary Education. Pgs 85 – 88.
OBJECTIVE
1. A collection of wires through which data is transmitted from one part of a computer to another is known
as _______
1. Address B. Bus C. Register
Computer data processing is grouped into the following EXCEPT one.
Conversion B. Manipulation C. Register
The following are types of register EXCEPT ___________
CMR B. CIR C. MDR
___________ Register acts like a buffer and holds data that is transferred from the memory to the
processor.
MDR B. CIR C. CPU
All data must be represented in a register before it can be processed.
TRUE B. FALSE
THEORY
WEEK 2 Date…………………..
Computer files: Computer files are the most basic unit of data that users can store on a disk. Every program,
image, video, song employee numbers, a 3-digit, and document is stored as a file
Record: A record is a collection of related data items or fields. Each record normally corresponds to a specific unit
of information. For example, employee number, employee’s name, basic salary and house rent allowance.
Field: Data items are physically arranged as fields in a computer file. Their length may be fixed or variable. Since all
individuals have 3 digits field is required to store the particular data. Hence, it is a fixed field. In contrast, since
customer’s name varies considerably from one customer to another, a variable amount of space must be available
to store this element. This can be called variable field.
Data item: Data item is the smallest unit of information stored in computer file. It is a single element used to
represent a fact such as an employee’s name, item price and so on.
Alphanumeric: also known as alphanumeric is a combination of alphabetic and numeric characters, and is used to
describe the collection of Latin letters and Arabic digits or a text construct from this collection. There are either 36
(single case) or 62(case-sensitive) alphanumeric characters. The alphanumeric character set consists of the
numbers 0-9 and letters A-Z.
File structure:
Data
Field
Record
file
Data: a data item is the smallest unit of information stored in computer file.
Serial: A serial file is one which the records have been stored in the order in which they have arisen. They have not
been sorted into any particular order. An example of a serial file is an unsorted transaction file. A shopping list is an
example of a non-computerized serial file. Serial files can be stored on tape, disc or in memory. Sequential: in
sequential file organization, records are organized in the sequence by which they were added. A sequential file
contains records organized in the order they were entered. The order of the records is fixed. The records are
stored and sorted in physical, contiguous blocks within each block the records are in sequence. Records in these
files can only be read or written sequentially.
Indexed: An indexed file organization contains reference numbers, like employee numbers, that identify a record
in relation to other records. These references are called the primary keys that are unique to a particular record.
Alternate keys can also be defined to allow alternate methods of accessing the record. For example, instead of
accessing an employee’s record using employee numbers, you can use an alternate key that reference employees
by departments. This allows greater flexibility for users to randomly search through thousands of records in a file.
However, it employs complex programming in order to be implemented.
Random file: This is the file organized via an index. Also called a “direct file” or “direct access file,’’ it enables quick
access to specific records or other elements within the file rather than having to read the file sequentially. The
index points to a specific location within the file, and the file is read from the point.
Sequential files: the method of access used is still serial but of course the files are now in sequence, and for this
reason the term sequential is often used in describing serial access of a sequential tape file. It is important to note
that to process (e.g. update) a sequential master tape file, the transaction file must also be in the sequence of the
master file. Access is achieved by first reading the transaction file and then reading master file until the matching
record (using the record keys) is found. Note therefore that if the record required is the twentieth record on the
file, in order to get it into storage to process it the computer will first have to read in all nineteen proceeding
records.
Random files: Generally speaking the method of accessing random files is RANDOM. The transaction record keys
will be put through the same mathematical formula as were the keys of the master records, thus creating the
appropriate bucket address. The transactions in random order are then processed against the master file, the
bucket address providing the address of the record required.
Master file: there are files of a fairly permanent nature, e.g. customer ledger, payroll, inventory, and so on. A
feature to know is the regular updating of these files to show a current position. For example, customer’s order will
be processed, increasing the “balance owing “figure on a customer ledger record. It is seen therefore that master
records will contain both data of a static nature, e.g. a customer name, address, and data that, by its nature will
change each time a transaction occurs, e.g. the” balance” figure already mentioned.
Transaction file: This is also known as movement file. This is made up of various transactions created from the
source documents. In a sales ledger application the file will contain all the orders received at a particular time. This
file will be used to update the master file. As soon as it had been used for this purpose it is no longer required. It
will therefore have a very short life, because it will be replace by a file containing the next batch of orders.
Reference files: A file with a reasonable amount of permanency. Examples of data used for reference purposes
are price lists, tables of rates of pay, names and addresses.
Criteria for classifying computer files: Criteria for classifying computer files are:
Hiit @ School, Computer Studies for Senior Secondary Education. Pgs 89 – 91.
EVALUATION
OBJECTIVE
THEORY
Close: Closing the file, thereby losing access until it is opened again.
The OPEN statement is used in writing information to a file. In general, the open statement follows this pattern;
The FOR portion indicates how the file will be accessed or operated; it may be APPEND, BINARY, INPUT, OUTPUT,
and RANDOM
The following opens a file, using mode OUTPUT and number 1, and then saves the text.
10 CLS
40 CLOSE 1
50 END
CODE
The combination of all these records forms a file. Thus, a file is a group of related records.
To facilitate the retrieval of specific records from a file, at least one field in each record is chosen as record key.
Usually, the key is unique to every record to avoid duplication of records in a file.
Example
10 CLS
70 CLOSE 1
120 LOOP
130 CLOSE 1
140 END
Note that Free-File function is used to determine the next available file handle to be used in the OPEN statement.
However, in a bigger project that uses many files, Free-file ensures that there is no conflicting File Handles used.
It‘s a good practice to use it whenever you‘re not sure of the number of files your program might need to open.
This is the line that does the physical opening of file and assigns it #FileNumber as its file handle. The ‘FOR INPUT’
part tells QuickBASIC that you want to open the file in Read mode as you‘ll be reading the contents of the file later
in the example.
Next is the loop indicate by the DO WHILE NOT EOF (FileNumber) line. In QuickBASIC EOF () means End Of File.
There is also BOF () for Beginning of File and LOF () for Length of File
Since you can’t go backwards on a sequential file, you won’t need BOF () at all.
The first line Gets a line of data
Computer file insecurity refers to the concept that a computer system is vulnerable to attack, and that this fact
creates a constant battle between those looking to improve security, and those looking to circumvent security.
Data loss refers to the unforeseen loss of data or information. An occurrence of data loss can be called Data Loss
Event and there are several possible root causes. Backup and recovery schemes are developed to restore lost data.
Overwriting is a process of writing a binary set of data on a memory. Overwriting generally occurs when unused file
system clusters are written upon with new data. In simple terms, it writes over the previous data.
Backup
Backup or the process of backing up a file refers to making copies of files so that these additional copies may be
used to restore the original after the data loss event.
Backup has two distinct purposes. The primary purpose is to recover data as a reaction to data loss, be it by data
deletion or corrupted data. The secondary purpose of backups it is recover data from historical period of time
within the constraints of a user-defined data retention policy.
Antivirus
An anti-virus program protects a computer file from malicious virus attack, detects and heals files that have been
attacked. Usually it consists of a firewall, a virus scanner and remover and sometimes other tools as well.
Password
It is a chosen secret string of characters that allows access to a computer, interface, files etc. The use of password
is at user’s discretion and caution must be exercised by the user to remember the password always.
Manual is using old method without the help of the technology or maybe less to perform certain task or work
while; computerized file system is using latest technology of ICT to carry out various tasks that is more effective
when compared with manual system in terms of the productivity and time usage.
EVALUATION
Hiit @ School, Computer Studies for Senior Secondary Education. Pgs 92 – 95.
WEEK THREE (3) WEEKEND ASSIGNMENT
OBJECTIVE
2. _______ is the process of making copies of files, so that the additional copies may be used to restore the
original after data loss event.
a. Data Loss Event b. Data Loss Occurrence c. Data Loss Show d. Data Loss occasion
a. Vulnerable to virus attacks b. Incompatible data file c. Cheap to set it up d. Data are often duplicated
5. The following are advantages of computer files over manual files EXCEPT one
THEORY
WEEK 4 Date…………………..
WORD PROCESSING 2
Word processing is the use of computer software to create, edit. View, store, retrieve and print text documents. A
text document is a written communication like letters reports, memo and so on. The software that is used for word
processing is called a word processor.
Microsoft word
WordStar
WordPerfect
Word pro
Corel WordPerfect
Lotus notes
Perfect writer
MultiMate advantage
Professional write
Word processors are used in place of typewriters because of the quality of outputs, ability to replicate copies
without having to retype or photocopies.
In offices
In publishing
In journalism
In education
Version:
Typing document
Editing document
Format painter
Goto
Spelling and grammar
Thesaurus
Word count
You can use word’s cut feature to remove information from a document. You can use the Paste feature to place
the information you cut anywhere in the same or another document. In other words, you can move information
from one place in a document to another in the same or different document by using the Cut and Paste features.
The office clipboard is a temporary storage area where copied and cut files are kept. When you copy or cut, word
stores the data you copied/cut on the Clipboard. You can paste the information that is stored on the Clipboard as
often as you like. When you copy/cut a document, the copied/cut data can be pasted into a new location.
Copying a document
Copying a document or portion of a document means duplicating the document. The original document will still
remain while the duplicate of it will be found in a new location. To copy a document five major methods are
involved and they are:
Shortcut method
Keyboard method
Shortcut method
Select Copy
Select paste
Keyboard method
Hold down the CTRL key as you drag the highlight to a new location.
Click on paste.
When a mistake is made all over a document, for example, you mistakenly typed fred instead of fried, the find and
replace feature helps to locate the errors and quickly replace them with the expected text. To apply the find and
replace feature in a document:
Click on the Find icon and drop down arrow and click find
Type the error text in the FIND WHAT text box and the corrected in the REPLACE if you want it one after another.
They check whether a document is error free both in spelling and grammar. To confirm if a document is error free
using the spelling and grammar tool:
It selects a sentence and asks you to ignore or click on its suggestion and click change. Select the one that applies.
When a spelling and grammar action is completed a dialog box as shown is displayed,
Click ok
Formatting a document
Formatting a document makes the document presentable. Formatting entails the following:
Font
Font Face: the text outlook format of a document: Microsoft has embedded the fo; owing font face: Arial, Times
New Romans, Tahoma, Elephant, Freestyle Script, Imprint MT, Shadow, and so on.
From the home Ribbon click on the font face (ctrl + shift + F)
Click the drop down arrow and select a font face of your choice.
Font Size: This displays text sizes of your choice: Microsoft has embedded font sizes ranging from 8-72.
From the Home Ribbon, click on the Font size (ctrl + shift + F)
Click the drop down arrow and select a font size of your choice.
Font style: This displays effects on text such as bold, italic, regular, bold italic.
BOLD
ITALIC
UNDERLINE
To select the different underline font style for your text, do the following:
Font Color: This displays color for your text, do the following:
From the Home Ribbon, click on the A icon drop down arrow.
Font Effect: This displays other effects on your text such as strike through, subscript, superscript
Strikethrough
From the Home Ribbon, click on the” Abc” icon drop down arrow.
Double Strikethrough
Subscript
Superscript
Type the text
Change case
Character spacing: This displays different characteristics of spacing that can be applied on a text they include:
Expanded or condensed, kerning, and so on
Paragraph:
Indent and spacing: This feature creates a text with spacing before and after. The effects here are : alignment ,
indentation , spacing , tabs.
Alignment
Click on indent and spacing tab. In the general options in the alignment drop down menu, select your desired
choice.
Indentation
Click on indent and spacing tab. In the indentation options, select your desired choice as shown in the dialog box.
A good word processor should have the ability to create, save and retrieve documents.
Every word processor should have the ability to manage files in the computer.
EVALUATION
Hiit @ School, Computer Studies for Senior Secondary Education. Pgs 96-100.
OBJECTIVE
_______ is the use of computer software to create, edit, view, store, retrieve and print text document.
Word Processor b. Word Communication c. Word Processing d. Word Application
The following are types of display effect of a Font Style EXCEPT one
Italics b. Underline c. Times New Roman d. Bold
________feature create a text with spacing before and after.
Indent and Spacing b. Superscript c. Change Case d. Double strikethrough
The following are examples of Indent and spacing EXCEPT one
Alignment b. Indentation c. Tabs d. Ribbon
THEORY
1. Write out the steps to carry out the following; (i) Change Case (ii) Subscript (iii) Superscript (iv)
Strikethrough (v) Double Strikethrough
1. List and explain the different methods in copying a document
WEEK 5 Date…………………..
INTRODUCTION
Information systems are important for the success of any modern business for organization. Every many
information systems are being developed to make them more competitive and improve the productivity and profit.
The two keys required for a successful development of information system are:
Thorough Systems analysis and design
Understand what the Business or organization requires.
Definition of terms
Systems analysis is the process of understanding in detail what a system should accomplish, how it will accomplish
it required to accomplish it.
Systems design is the process of specifying in detail how components of an information system should be
implemented physically.
Systems analyst is a person that uses analysis and design techniques to solve business problems using information
technology.
To be a good and successful systems analyst, the person must have the following skills:
The steps taken by a system analyst to solve problems are stated below:
1. Study and understand the problem: The analyst must identify that there is a problem to be solved and
specify that it is feasible to solve the problem.
1. Define the requirements for solving the problem: The analyst will identify the facts or data that are
required to solve the problem.
2. Develop a set of possible or alternative solutions: If there are alternative solutions, the systems analyst
must develop them and decide on the best solution to use. However, in most cases, there may be only
one solution which is chosen.
3. Define the details of the chosen solution: All the facts and method need to solve the problem are
specified in detail.
4. Solve the problem: The problem is solved using the chosen solution method.
5. Monitor to ensure that desired result or outcome is accomplished: Here, the analyst will make sure that
the formula is not miscalculated.
Example: let us apply this process in solving a simple interest (SI) problem: A man invested the sum of N500,
000.00 for 5 years at an interest rate of 12% per annum. Calculate the amount at the end of the period.
Solution:
Step1: Study and understand the problem: the simple interest is understood as defined.
Step 2: verify that the benefits of solving the problem outweigh the cost: The SI can be solved with our current
knowledge and the resources that we have like four figure tables, calculator and so on. We do not need to hire
anybody.
Step3: Define the requirements for solving the problem: the requirements for solving the SI problem are Principal
(N500, 000.00), rate (12%) and Time (5years).
Step4: Develop a set of possible or alternative solutions: The problem can be solved in two ways: First calculating
the SI using the formula (I=P*R*T/100) and then calculate the amount as A=Principal + Interest. Secondly, another
way is calculating the Amount using the formula that A=P (1+(R*T/100))
Step 5: Decide which solution is best and recommended: We decide to use the first method because it is simpler
than the second.
Step 6: Define the details of the chosen solution: The variables (facts) that we need to solve this problem are as
stated in step 3 above and the procedure are as stated on step 4(1) above.
I. I=P*R*T/100
Step 8: Monitor to ensure that desired result is accomplished. To make sure that the formula procedure and
calculations are correct.
CONCEPT OF SYSTEMS
What is a system?
A system is a collection of interrelated components that function together to form a whole and achieved outcome.
Examples:
An information system is a collection of interrelated components that collect, process, store and provide as an
output the information needed to complete a (business) task.
In systems development, application systems are referred to as information systems. Therefore, an information
System can also be defined as a collection of programs running on computers which interact with one another as
well as humans to provide the necessary information needed to make decisions within an organization.
What is a subsystem?
A subsystem is a part of a larger system that can function on its own to perform a task. It can be a system having
subsystems or it may just be a single system. The components that make up the overall computer system can be
described as sub-systems. These are mainly hardware and software subsystems. The process of dividing a system
into subsystems and components is called Functional Decomposition.
Some new types of information systems that cannot be classified as above are listed below:
1. Data warehouses
1. Enterprise resource planning
2. Enterprise systems
3. Expert systems
4. Geographic information system
5. Global information system
6. Office Automation
EVALUATION
Hiit @ School, Computer Studies for Senior Secondary Education. Pgs. 101 – 103.
OBJECTIVE
1. _______ is a collection of interrelated components that function together to form a whole and achieve an
outcome.
1. Subsystem b. System c. Life cycle d. Development
2. The following are the Water fall Development cycle stage EXCEPT______
3. Investigation Stage b. System analysis Stage c. System manufacturing Stage
4. System design Stage
5. The oldest and classical method of SDLC is called_________ a. Waterfall Mean
THEORY
1. Define the following; I. System Development Life Cycle II. System Analysis
WEEK 6 Date…………………..
Systems development is a planned undertaking with a fixed beginning and end that produces the desired result or
product. It may be a large job that involves many people working for a long period or it can also be a small
assignment that one person can finish in a day. The SDLC PROVIDES AN OVERALL FORMALISED METHOD FOR
managing the systems development processes and activities. It represents a detailed and specific set of
procedures, steps, and documents that are required for the development of an information system development.
The SDLC believes that the development of information systems should follow a structured and methodical way,
requiring each stage of the life cycle from inception of the idea to delivery of the final system, to be carried out in
rigid and sequential order.
Definition of SDLC: The systems development life cycle is the process of understanding how an information system
(IS) can support the business needs of an organization, designing the system, building it and delivering it to the
users.
Objectives of SDLC
1. Investigation stage
1. Systems Analysis stage
2. Systems Design Stage
3. Systems Implementation stage
4. Systems Deployment
5. Systems maintenance Stage
1. Investigation stage: this stage involves the investigation of the existing system. The existing system is
studied and evaluated to identify its problems and deficiencies. It involves gathering information about
the existing systems. The information could be gathered through Observation (observing the system),
Questionnaire (preparing questionnaires based on the existing system and give to the users to fill) and
Interviewing (asking the users verbal questions about the system). The information gathered is used in a
feasibility study. The aim of the feasibility study is to identify the problems and proffer feasible solution
through a feasibility report. It also identifies how this problem is to be solved (either manually or
computerized), when it is to be solved and why it should be solved. It defines the objectives and goals that
the new system to be developed will achieve. The feasibility report is the main output of the investigation.
Systems Analysis stage: This stage starts with a more detailed investigation into the existing system. The
same facts finding methods of observation, questionnaire and interview are used to gather end-users
information such as data and procedures and processes. The data and procedures are analyzed to define
the new system requirements. The new system requirements are defined addressing the deficiency in the
existing system with specific proposals for improvement. The output of the analysis stage is the users’
requirements.
Systems Design Stage: At this stage the proposed system is designed. It involves layout plans for the
physical construction, hardware requirements, operating systems, programming, communication, and
security. The design describes the desired features and operations of the proposed system in detail,
including screen layouts, business rules, process diagrams, flow charts, pseudo-code and other
documentation such as data dictionary and so on. The system design stage produces the Systems
Specification.
Systems Implementation stage: This stage is the stage where programs of the new system are written in
the specified programming language in line with the systems specifications. It involves testing of all the
new system and adjustments and corrections are made where necessary.
Systems Deployment: Here the system that was developed in stage 4(four) is put into use. It involves
bringing all the different parts the proposed system together. All parts of the system is integrated and
tested for errors, bugs and how they operate. It includes the installation and deployment. This is the stage
where the software is put into use and runs the actual business.
Systems maintenance Stage: once the new system is deployed and running, it is subjected to exhaustive
evaluation on how it is able to achieve its setup goals. Areas for improvement will be modified and
enhanced. Sometimes the mistakes or errors can be detected. Procedures and processes may change.
Thus the remaining life of the system is subject to changes, correction, additions, moves to a different
computing platform and more. The system maintenance stage involves all the activities, processes and
procedures required by the system to exist forever.
ADVANTAGES OF SDLC
DISADVANTAGES OF SDLC
Hiit @ School, Computer Studies for Senior Secondary Education. Pgs 104 -105
WEEKEND ASSIGNMENT
OBJECTIVE
THEORY
WEEK 7 Date…………………..
PROGRAM DEVELOPMENT
Definition of a Program
A computer program can be defined as a list of instruction issued to the computer to perform a particular task.
Programs are written in computer programming languages.
1. Accuracy
1. Readability
2. Maintainability
3. Efficiency
4. Generality
5. Clarity
6. Reliability
1. Accuracy: every good program must be error free.
1. Readability: the program should be easy for any programmer to read and understand.
2. Maintainability: a careful written program should be very easy to amend and maintain if need be.
3. Efficiency: Should have the ability to solve a particular problem skillfully.
4. Generality: should be able to solve all similar problems.
5. Clarity: should be straight forward and easy to understand.
6. Reliability: should be depended upon at all times.
Precaution
Problem definition: the programmer is expected first of all to understand the problem and know exactly what the
problem entails. The definition of the problem must be unambiguous.
Problem analysis: The programmer is expected to analyze the problem to determine how it will be solved, the
required inputs and output
Planning the solution: before a program is written, the algorithm or flowchart for that program must be drawn and
tested before the actual coding of the program and this is called dry running a program. The flowchart therefore, is
a diagrammatical representation of the steps involved in writing a given program.
Program coding: This is the actual writing or coding of the program in a particular programming language e.g.
BASIC, VBASIC, FORTRAN, Pascal, and COBOL and so on.
Disk checking: This is used to check or verify that the design represents a correct solution to a problem and it is
very important to follow through the design using suitable test data.
Problem compilation: when the coding process is completed, the program will be compiled if it is necessary. It is
necessary to compile if the programming language allows it.
Program testing: this is similar to proofreading. The written program is tested and errors corrected to check the
program is able to solve the problem it is expected to solve
Program documentation: this involves writing a detailed description about the program and some specific facts
pertaining to the usage and maintenance of the program.
Program running: this is the actual running or execution of the program with the compiler or interpreter so as to
check if the desired output is generated.
Maintenance:
It is the process of updating or amending previously written program for current use.
Hiit @ School, Computer Studies for Senior Secondary Education. Pgs 106 – 107.
OBJECTIVE
1. The actual writing or coding of program in a particular programming language is known as_________
1. Debugging b. Program Coding c. Program Executing d. Program Decoding
The following are characteristics of a good program EXCEPT one.
Accuracy b. Clarity c. Compatible d. Readability
The following are characteristic of an interpreter EXCEPT one
a. Execution is fast b. The resulting code is some sort of intermediate code c. The resulting code is
interpreted by another program d. relatively little time is spent analyzing and processing the program
THEORY
1. Define a program
1. State four characteristics of a program
2. List the steps involved in program development
3. State two precautions to be taken when writing a program.
WEEK 8 Date…………………..
Algorithm is the step by step procedure of solving a particular problem. It is simply a sequence of clear and precise
instructions for solving a particular problem. Algorithms are usually written in English and some few mathematical
notations (signs, symbols)
Characteristics of Algorithms
Example
Flowcharts
The flowchart is the diagrammatic representation of an algorithm. It shows the steps involved in solving a
particular task.
Characteristics of flowchart
Flowchart symbols:
Reading Assignment: Reading Assignment:
Hiit @ School, Computer Studies for Senior Secondary Education. Pgs 108 – 109
OBJECTIVE
1. _________ is the step by step procedure of solving a particular problem.
2. _________ is the diagrammatic representation of a step by step procedure of solving a particular problem.
a. Flowcharts are read and drawn from bottom to top b. Flowcharts end symbol signifies the end of a
program c. Flow line are used to connect the flowchart symbols
a. Different flowchart symbols are used for different operation.
a. They are written in sequence b. An algorithm should be effective c. It must be ambiguous and
inconsistent d. They are written in English like statement
THEORY
WEEK 9 Date…………………..
BASIC stands for BEGINNNERS ALL-PURPOSE SYMBOLIC INSTRUCTION CODE. It is a single easy to use language
designed also for beginners. It is not only simple but also powerful. It is science oriented. Professor John Kemeny
and Thomas Kurtz developed the language in 1964 at Dartmouth College, U.S.A., as a means of teaching students a
simple language for programming a computer. The program can be used to solve problem covering a wide range of
application on many different types of digital computer. Because the BASIC Language has been designed for ease
of use and is readily available on most computers, program development can be achieved in minimum time.
EVALUATION
1. What is BASIC?
2. List FIVE versions of BASIC.
For the computer to execute your instructions in order to produce the desired result, the instruction must be first
be interpreted to what the computer can understand by another program called the BASIC INTERPRETER (or
TRANSLATOR). The BASIC interpreter converts your program into a form that can be executed directly by the
computer.
EVALUATION
KEYWORDS IN BASIC
This is also referred to as BASIC statement or a reserved word. It is an instruction in BASIC, which has a specific
means to the compiler or interpreter.
1. REM STATEMENT
The REM statement is a remark statement. It is used to insert remarks in the program. Such remarks are used to
explain what the program is all about.
Example:
LET STATEMENT
Examples:
10 LET A = B + C
INPUT STATEMENT
Input is used to assign or give values to variables while program is running. It can be used with both numeric and
string variables.
Examples:
10 INPUT A, B, C
PRINT STATEMENT
The print statement tells your computer to display the output of the executed program on the screen of the
monitor (VDU).
Example:
10 PRINT SUMS
END STATEMENT
End Statement is an instruction used to terminate the program. One the computer encounters END statement, it
automatically terminates the program.
50 END
RUN STATEMENT
The RUN statement is used to execute a program. In Q-BASIC, F5 is used to RUN a program. Note that the program
will not RUN if any mistake or error is detected in it.
EVALUATION
1. ……………… converts your program into a form that can be executed directly by the computer
1. Software (b) Interpreter (c) Hardware
2. BASIC means BEGINNNERS ALL-PURPOSE SYMBOLIC INSTRUCTION ……………..
3. Code (b) Centre (c) Computer
4. ………………….. used to assign (or give) values to variables
5. REM (b) INPUT (c) LET
6. ………………… statement is used to execute a program
7. INPUT (b) RUN (c) END
8. …………….. is used to RUN a program
9. F5 (b) F10 (c) F1
THEORY
1. What is BASIC?
1. Write the function of the following BASIC keywords
2. LET (b) INPUT (c) PRINT (d) REM (e) RUN
Visual Basic Calculator
We are going to create a “first program” that will be written in Visual Basic (VB). Our
project will be a basic calculator that will teach the logic and provide the code for our calcu-
lator. Our instructions will be set up so that the user creates one button for addition and
writes code for it. From this the user will be able to add more (subtraction, division, etc.) on
to their program if desired. Watch video for demonstration.
Important Note:
These instructions assume you already have Visual Studio installed and open.
Your User Interface (where toolbars are placed) my look different from the
instructions. These instructions will not address how to make changes to the
User Interface. Making your User Interface look like the provided pictures is
not necessary, but will be helpful.
If you make a mistake, i.e. double click on an object by accident, move to the
last step (Troubleshooting) for common mistakes and fixes.
Step 5: Set the save location. Desktop is recommended as it is the easiest to find.
Step 6: Click OK
Step 7: If needed, click on the view tab then select the Toolbox, Property, and Solutions Ex-
plorer window
Step 2: Design the Graphical User Interface (GUI)
Helpful Tip:
On the properties toolbox set in alphabetical order. Refer to the picture of the
Toolbox, green circle.
Step 2: In the properties window, under the Text property, type Simple Calculator
Step 3: In the properties window, under the StartPosition property, select CenterScreen
Step 5: Click and drag a label from the Toolbox to the form
Step 6: While the label is selected, in the properties window, under the Text property, type
Simple Calculator. Note: Since this label is the main text describing the text, you can change
the size and boldness of the text under the Font property in the properties window but is
not required for this project
Step 7: Proceed to do this for the following labels (5) and place them accordingly. Name
them: Operators, Operation, Operand 1, Operand 2, and Result (See picture) Note: Objects
can either be dragged or double clicked to be placed onto the GUI
Step 10: While the button is selected, in the properties window, under the Name property,
enter btnAdd
Step 12: Click and drag a TextBox from the ToolBox beside the “Operand 1” label (See pic-
ture)
Step 13: While the TextBox is selected, in the properties window, under the Name property,
enter txtOperand1
Step 14: Repeat Step 12 but place the second TextBox beside the “Operand 2” label (See
picture)
Step 16: Click and drag a label between the two text boxes (See picture)
Step 17: While the label is selected, in the properties window, under the Name property,
enter lblOperator
Step 19: Under 9the AutoSize property, select False. Note: This lets you resize the label at
your desire
Step 21: Click and drag another label beside the “Result” label
Step 24: Click and drag a button from the Toolbox below the “Result” label (See picture)
Step 25: While button is selected, in the properties window, under the Name property, en-
ter btnClear
Step 26: Change the text property for the Clear button to Clear
Step 27: Click and drag a button from the Toolbox beside the Clear button (See picture)
Step 28: While button is selected, in the properties window, under the Name property, en-
ter btnExit
Step 29: Change the text property for the Clear button to Exit
Step 30: Enter the following code by double clicking on each button to open the code win-
dow:
Step 3: Coding the Add Button
Goal: Add to numbers that the user inputs into the text boxes
Code Explanation
Goal: To clear all boxes on the GUI and set the cursor to the top text box (Operand 1)
Code Explanation:
Clear()Function clears a text box. This function can only be used on a text box
Label boxes must be cleared by setting the .Text property to nothing
Focus() Function sets the cursor to the text box
Step 5: Coding the Exit Button
Click the green play button to run the program (Reference the picture above)
Note: While the program is running, you can test to see if your program is working prop-
erly.
Click either the exit button or the red “X” on the program when done.
In this project, you have successfully completed how to make a simple calculator in visual
basic. We only had you make an addition button but feel free to make other operators at
your desire. They follow the same steps that are mentioned above. You can now use this as
a calculator to make calculations on anything you want. The purpose of this project was to
inform users who have no programming experience how to make a simple program. If you
wish to learn more about Visual Basic, there is a lot of information online as well as classes
that teach Visual Basic (CNIT 175 if you are a Purdue Student). Thank you for taking the
time to make this project.