Sunteți pe pagina 1din 27

CHAPTER 3: SOFTWARE

1.0 Introduction

Computers and computer software have become a part of the fabric of every day life.
They are great as long as they are working. We give little thought to the processes and
programs running behind the scenes to keep them functioning effectively.

Computer software is a program or system consists of a series of related instructions


that tells the computer what tasks to perform and how to perform them.

2.0 Categories / Types of Software


Software can be categorized into:
• System software
o Operating Systems
o Utility Programs
• Application software
o Off-the-shelf software
o Bespoke software

2.1 System Software


System software is a program that controls the operation of a computer system and
manages computer resources. It provides a ‘bridge’ between software programs and the
hardware. Two types of system software: Operating system and utility programs.

2.1.1 Operating System


An operating system (OS) is a set of programs containing instructions that work
together to coordinate all the activities among computer and mobile device.

Start and shut down


Provide a user
a computer or Manage programs Manage memory
interface
mobile device

Establish an Internet Monitor


Coordinate tasks Configure devices
connection performance

Provide file
management and Updating operating
Control a network Administer security
other device or system software
media-related tasks

Page 1
Operating System Functions

Example of operating system function


The process of starting or restarting a computer is called booting. It can be done through
cold boot or warm boot.

Cold Boot
•Turning on a computer that has been powered off completely

Warm Boot
•Using the operating system to restart a computer

Page 2
Example: How an operating system interacts with a user, an application and
hardware

Categories of Operating Systems (OS)

OS

Desktop Server Mobile

Windows Google
Windows
Server Android

Mac OS X
OS X Apple iOS
Server

Windows
UNIX UNIX
Phone

Linux Linux

Chrome OS

Page 3
A desktop operating system is a complete operating system that works on desktops,
laptops, and some tablets. It is also known as stand-alone operating systems.
• Windows – most widely used; from Microsoft Corporation.
• The Macintosh operating system – Mac OS has earned a reputation for its ease
of use.
• UNIX is a multitasking operating system developed in the early 1970s.
• Linux is a popular, multitasking UNIX-based operating system.
• Chrome OS is a Linux-based operating system designed to work primarily with
web apps.
o Focuses on Internet connectivity and cloud computing
o Speed is determined by the speed of the Internet

Server Operating Systems


Server operating systems are also known as network operating systems.
OS stored on network server which coordinates all communication between the other
computers.

Mobile Operating Systems


The operating system on mobile devices and many consumer electronics is called a
mobile operating system. It is also known as embedded operating systems – RTOS
(real-time operating systems)
• Smartphones
• Smartwatches

Android

•Android is an open source, Linux-based mobile operating system designed by Google


for smartphones and tablets.

iOS

•iOS, developed by Apple, is a proprietary mobile operating system specifically made for
Apple’s mobile devices.

Windows Phone

•Windows Phone, developed by Microsoft, is a proprietary mobile operating system


that runs on some smartphones.

Interface of Operating System (OS)


OS can be in Command Line Interface (CLI) or Graphical User Interface (GUI). GUI
makes it easy for the user, therefore makes the OS user-friendly.

Command Line Interface (CLI)

Page 4
Example of Commands for CLI

Graphical User Interface (GUI)

2.1.2 Utility Programs


A utility program is a type of system software that allows a user to perform
maintenance‐type tasks.

Page 5
• Specialized programs to make computing easier
• Most essential utilities
– Troubleshooting or diagnostic programs
• Recognizes and correct problems
– Antivirus programs
• Guard your computer against viruses
– Backup programs
• Copies of files to restore if necessary
– File compression programs
• Reduces the size of files for more efficient storage

There are stand-alone utility programs offer improvements over those features built-in
to the operating system. Functions include protecting against viruses, securing a
computer from unauthorized access and compressing files. Examples of stand-alone
utility programs: Antivirus programs, personal firewall and file compression

A file manager is a utility that performs functions related to file management


• Displaying a list of files
• Organizing files in folders
• Copying, renaming, deleting, moving, and sorting files and folders
• Creating shortcuts

A disk cleanup utility searches for and removes unnecessary files


• Downloaded program files
• Temporary Internet files
• Deleted files
• Unused program files

Page 6
A disk defragmenter reorganizes the files and unused space on a computer’s hard disk
so that the operating system accesses data more quickly and programs run faster.

2.2 Application Software


An application or app, sometimes called application software is written to perform a
particular job for the users.

Page 7
System Software vs Application Software

3.0 Software Development and Programming Languages

System development is a set of activities used to build an information system. System


development activities are grouped into phases, and is called the system/software
development life cycle (SDLC). Software development is the process of creating a
software product. It is also known as application development or software design. The
term "software development" may be used to refer to the activity of computer
programming, which is the process of writing and maintaining the source code.

Why we should learn programming / coding?


1. Programming is a basic literacy in the digital age.
2. Programming can change the world.
3. “You have an idea for then next big innovation? Great. Can you bring it to life?”
4. Programming doesn’t have to be hard to learn.
o Watch this video: https://www.youtube.com/watch?v=F9GujgK0y2M

Page 8
System development should follow three general guidelines:
• Group activities or tasks into phases
• Involve users
• Define standards

Software Development Life Cycle (SDLC)


Software Development Life Cycle (SDLC) is a process used by the software industry
to design, develop and test high quality software. SDLC aims to produce a high-quality
software that meets or exceeds customer expectations within times permitted and cost
estimates.

Page 9
Debugging
Debugging is part of the software testing process. It is the process of finding and
resolving of defects or problem within the program.

Trial and Error


Trial and error is a fundamental method of problem solving.
It is characterised by repeated, varied attempts which are continued until success.

Programming Languages
We may communicate with computers through low level and high level programming
languages. A programming language is a set of words that enable a software
developer to communicate instructions to a computer or mobile device.

Computer programming (often shortened to programming, scripting, or coding) is


the process of designing, writing, testing, debugging, and maintaining the source
code of computer programs. The source code is written in one or more programming
languages (such as C++, C#, Java, Visual Basic and so on).

Generation of Programming Languages


• 1GL or first-generation language was machine language or the level of
instructions and data that the processor is actually given to work on (which in
conventional computers is a string of 0s and 1s).

• 2GL or second-generation language is assembly language. An assembler converts


the assembler language statements into machine language.
o A typical 2GL instruction looks like this:

• 3GL or third-generation language is a high-level programming language, such as,


C, C++, Visual Basic and Java. A compiler converts the statements of a specific
high-level programming language into machine language. The programmer writes
instructions that tell the computer what to accomplish and how to do it.
o The C programming language is used to write many of today’s programs.

o C++ is an extension of the C programming language.

Page 10
o Visual Studio is Microsoft’s suite of object-oriented application development
tools that assists software developers in building programs and apps for
Windows or any operating system that supports the Microsoft .NET Framework.

o Java is an object-oriented programming language developed by Sun


Microsystems.

• 4GL or fourth-generation language is designed to be closer to natural language than


a 3GL language. A 4GL enables users and programmers to access data in a database.
One popular 4GL is SQL.
o A 4GL language statement might look like this:

• 5GL or fifth-generation language is natural language that uses a visual or graphical


development interface to create source codes. Example: Scratch
Fifth generation programming allows people to interact with computers without
needing any specialised knowledge. People can talk to computers and the voice
recognition systems can convert spoken sounds into written words.

Algorithm
Algorithm = sequence of instructions or steps to complete a task

Example:

Page 11
Algorithm and computational thinking are both independent of the programming
language we choose to implement the program.

Computational Thinking (CT)


1. Decomposition
2. Pattern Recognition
3. Abstraction
4. Algorithm Design

Page 12
Activity 1: Computational Thinking with Scratch

Go to https://scratch.mit.edu/

Q1: Using Scratch program, draw a square box.

Page 13
Q2: Using Scratch program, draw a hexagon.

Q3: Using Scratch program, draw an octagon.

Q4: How could you reduce the instructions in the code but still produce the same
output as in Q3?

Page 14
Algorithms
• Pseudocode or Flow Charts are often used to show the structure and functionality
of a program.

• In Pseudocode the individual actions to be carried out by the program are stated in
plain English.

• They can be visually represented in a Flow Chart using symbols and arrows.

Page 15
Activity 2: Flowchart

Draw a flowchart on how to make a cup of coffee.

Page 16
Basic Programming Constructs/Concepts
• Sequence
o a sequence or set of instructions put in order
• Selection
o IF Statements and CASE Statements
• Iteration
o Looping

Activity 3: Analyze the programming constructs in use

See if you can find:


• Sequence;
• Selection: If Statements;
• Iteration: Loops;
• The use of a variable

Page 17
Arduino IDE
Arduino UNO requires Arduino software to run. You can download the software from
Arduino website (https://www.arduino.cc/en/main/software).

Arduino IDE is compatible with Windows, Mac OS X and Linux. You just need to
choose the appropriate operating system installation package for your computer. If you
are a Windows user, it is recommended that you choose Windows ZIP file for non
admin install.

Example of Arduino code: Blinking an LED

Or

const int LED = 13; Or


void setup()
void setup() {
{ pinMode(13, OUTPUT);
pinMode(LED, OUTPUT); }
}
void loop()
void loop() {
{ digitalWrite(13, HIGH);
digitalWrite(LED, HIGH); delay(1000);
delay(1000); digitalWrite(13, LOW);
digitalWrite(LED, LOW); delay(1000);
delay(1000); }
}

Page 18
Activity 4: Interpret the Arduino Code

void setup()
{
pinMode(8, OUTPUT);
}
void loop()
{
digitalWrite(8, HIGH);
delay(2000);
digitalWrite(8, LOW);
delay(2000);
}

Activity 5: Construct Arduino Code by using Arduino IDE

Project 1: Light up your first LED: Write the code for Arduino program where the
LED connected to pin 9 will turn on for 1 second and turn off for 1 second.

Tip: If the connection to Arduino is disconnected, de-select/select the COM port or unplug and re-plug
the USB cable.

Create this program.

Arduino code:
void setup()
{
pinMode(9, OUTPUT); //Set pin 9 as output
}

void loop()
{

Page 19
digitalWrite(9, HIGH); //HIGH means on the LED
delay(1000);
digitalWrite(9, LOW); //LOW means off the LED
delay(1000);
}

Project 2: Arduino Traffic Light: Create a traffic light with 3 LEDs.

Create this program.

Arduino code:
void setup()
{
pinMode(2, OUTPUT);
pinMode(4, OUTPUT);
pinMode(6, OUTPUT);
}

void loop()
{
digitalWrite(6, HIGH); //Green light is on
digitalWrite(4, LOW);
digitalWrite(2, LOW);
delay(5000);

digitalWrite(6, LOW);
digitalWrite(4, HIGH); //Yellow light is on
digitalWrite(2, LOW);
delay(3000);

Page 20
digitalWrite(6, LOW);
digitalWrite(4, LOW);
digitalWrite(2, HIGH); //Red light is on
delay(5000);
}

Project 3: Countdown Light: Create a countdown light that off LEDs one by one in
a sequence.

Create this program.

Arduino code:
void setup()
{
pinMode(2, OUTPUT);
pinMode(4, OUTPUT);
pinMode(6, OUTPUT);
pinMode(8, OUTPUT);
pinMode(10, OUTPUT);
}

void loop()
{
digitalWrite(2, HIGH);
digitalWrite(4, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, HIGH);
digitalWrite(10, HIGH);

Page 21
delay(1000);

digitalWrite(2, HIGH);
digitalWrite(4, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, HIGH);
digitalWrite(10, LOW);
delay(1000);

digitalWrite(2, HIGH);
digitalWrite(4, HIGH);
digitalWrite(6, HIGH);
digitalWrite(8, LOW);
digitalWrite(10, LOW);
delay(1000);

digitalWrite(2, HIGH);
digitalWrite(4, HIGH);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(10, LOW);
delay(1000);

digitalWrite(2, HIGH);
digitalWrite(4, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(10, LOW);
delay(1000);

digitalWrite(2, LOW);
digitalWrite(4, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(10, LOW);
delay(1000);
}

Page 22
Project 4: Chaser Light: Create a chaser light with one-direction running pattern.

Create this program.

Arduino code:
void setup()
{
pinMode(2, OUTPUT);
pinMode(4, OUTPUT);
pinMode(6, OUTPUT);
pinMode(8, OUTPUT);
pinMode(10, OUTPUT);
}

void loop()
{
digitalWrite(2, HIGH);
delay(50);

digitalWrite(2, LOW);
digitalWrite(4, HIGH);
delay(50);

digitalWrite(2, LOW);
digitalWrite(4, LOW);
digitalWrite(6, HIGH);
delay(50);

digitalWrite(2, LOW);

Page 23
digitalWrite(4, LOW);
digitalWrite(6, LOW);
digitalWrite(8, HIGH);
delay(50);

digitalWrite(2, LOW);
digitalWrite(4, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(10, HIGH);
delay(50);

digitalWrite(2, LOW);
digitalWrite(4, LOW);
digitalWrite(6, LOW);
digitalWrite(8, LOW);
digitalWrite(10, LOW);
delay(50);
}

Activity 6: Creating a game using fifth generation language

Do you ever think of how to create a game? Let’s code your game!

Go to https://studio.code.org/flappy/1
Watch the video and try out to code for “Flappy Bird” game.

Activity 7: Code your games!

Have fun learning:


• Code a game with BB-8:
– https://code.org/starwars
– choose the one using “BLOCKS”

• Code a game with Angry Bird:


– https://studio.code.org/hoc/1

• Code a game with Anna and Elsa:


– https://studio.code.org/s/frozen/stage/1/puzzle/1

• Code a game with Minecraft:


– https://code.org/minecraft

Page 24
Page 25
Activity 8: Animation with Scratch – Pong Game

• Download and install Scratch 2 Offline Editor:


https://scratch.mit.edu/download/scratch2
• Click on Tips, then click on “Create a Pong Game” and follow the step-by-step
instructions prompted.

Activity 9: Animation with Scratch – Rock Band

• Create “Rock Band” project. Follow the instructions given in Rock Band pdf file.

Activity 10: Exploration with BB-8

• BB-8 is a droid character in the Star Wars films.


• BB-8 can be controlled by using your smartphone via Sphero BB-8 app.
• You can learn coding by program BB-8 via Sphero Edu app.

Activity 11: Introduction to Programming with Karel

• Go to this link- https://codehs.com/hoc_karel


• Watch the YouTube video prompted.
• After the video, click “Continue”, then click “Explore this example”.
• You may click on “Switch to Block View” or “Switch to Code View”.
• Click “Run” and click “Continue” to Your first Karel Program, click on “Let’s go”
and try to code to tell Karel what to do.
• Once you done it correctly, click on submit+continue. Continue to do the exercise
until you obtain the certificate prompted on screen.

Page 26
Tutorial 3

1. Define the term of software. (1 mark)

2. Identify TWO (2) types of system software. (2 marks)

3. Give TWO (2) examples of desktop operating system. (2 marks)

4. Discover FIVE (5) functions of operating system. (5 marks)

5. The process of starting or restarting a computer is called booting. It can be done


through cold boot or warm boot. Explain how cold boot and warm boot can be done.
(2 marks)

6. Write a paragraph about utility programs with examples. (3 marks)

7. Disk defragmenter is one of the utility programs. Explain the purpose of disk
defragmenter. (2 marks)

8. Classify TWO (2) categories of application software. (2 marks)

9. In your opinion, why bespoke software is expensive? (3 marks)

10. Summarize FIVE (5) generation of programming languages. (10 marks)

End of Chapter 3

Page 27

S-ar putea să vă placă și