The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.
Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by omer.faheem, 2020-07-21 05:42:07

Computing Book 8

This page has been left blank intentionally

Acknowledgement


Project Team


Mr Omer Faheem

General Manager Education Technology

Mr Raheel Essa
Deputy Manager Education Technology

EDTECH Department


Regional Computing Curriculum Leaders


Group Head Office: 31 – Industrial Area, Guru Mangat Road,
Gulberg III, Lahore, Pakistan.
Ph: +92 (42) 111 444 123
Fax: +92 (42) 35773065
Website: www.thecityschool.edu.pk


The entire computing curriculum is mapped with the attainment levels of the
UK National Curriculum, ICDL and ISTE Student Standards 2017-2018.





























All rights reserved. No part of this publication may be reproduced or transmitted in any part by any
means at any time.

Class 8

Table of Contents



Acknowledgement ________________________________________________________________ 2

Internet Search Techniques and e-Safety ______________________________________________ 7

Key Learning Points: _______________________________________________________________________ 7
Search Engine: ____________________________________________________________________________ 7

How a Search Engine Works: ________________________________________________________________ 7
Internet Searching Strategies: _______________________________________________________________ 8

Ethical Citation: ___________________________________________________________________________ 9
What is Digital Citizenship? _________________________________________________________________ 9

What is Digital Resilience? __________________________________________________________________ 9
Cyber Bullying: ___________________________________________________________________________ 9

Fake News: _____________________________________________________________________________ 10
Pop-Up Blocking: _________________________________________________________________________ 10

Live Streaming: __________________________________________________________________________ 10
Password Protection: _____________________________________________________________________ 11

Privacy Protection: _______________________________________________________________________ 11

Advanced Imaging _______________________________________________________________ 13

Introduction: ____________________________________________________________________________ 13
What are Raster Graphics?_________________________________________________________________ 13

Introduction of Adobe Photoshop interface: ___________________________________________________ 13
Understanding of resolution, colour depth and colour mode. _____________________________________ 15

Selection Tools: __________________________________________________________________________ 17
Understanding Layers and How They Work: ___________________________________________________ 18

Image Adjustments and Enhancements: ______________________________________________________ 19
Apply a gradient fill: ______________________________________________________________________ 20

Border, Shadow, Bevel & Emboss: ___________________________________________________________ 21
Scale & Rotate: __________________________________________________________________________ 22

Layer Opacity and Blending: ________________________________________________________________ 22
Hue and Saturation: ______________________________________________________________________ 23

Perspective Crop Tool: ____________________________________________________________________ 24
Use of Retouch Tools: _____________________________________________________________________ 24

Saving images for web and print media. ______________________________________________________ 25






The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 3 of 75

Class 8

Handling Databases with Research__________________________________________________ 27

What is a Database: ______________________________________________________________________ 27

Introduction to MS Access: _________________________________________________________________ 27
MS Access User Interface: _________________________________________________________________ 27
Use of Data Types in Databases: ____________________________________________________________ 28

Organize and create tables: ________________________________________________________________ 28

Create Relationships Between Tables Using Primary Key & Foreign Key:_____________________________ 30
Primary Key _____________________________________________________________________________ 30

Foreign Key: ____________________________________________________________________________ 31
Constraints in Database: __________________________________________________________________ 31

Creating Relationships in MS Access: _________________________________________________________ 31
Create Simple and Complex Queries: _________________________________________________________ 34

Create Forms and Reports Through the Wizard: ________________________________________________ 35
Import and Export Data in MS Access: ________________________________________________________ 37

Importing Data in MS Access: ______________________________________________________________ 38
Exporting Data from MS Access: ____________________________________________________________ 39

Microsoft Forms _________________________________________________________________________ 40
Accessing Forms: _________________________________________________________________________ 40

Creating a New Form: _____________________________________________________________________ 40
Sharing a Form: __________________________________________________________________________ 43

View Form Responses: ____________________________________________________________________ 44
Viewing Saved Forms: _____________________________________________________________________ 44

Developing Applications – Visual Studio ______________________________________________ 45

First Visual Basic Program: _________________________________________________________________ 45

Variables: ______________________________________________________________________________ 46
Common Data Types: _____________________________________________________________________ 47

Declaring a Public Variable _________________________________________________________________ 48
Use decisions and repetitions: ______________________________________________________________ 49

IF…Then Statement _______________________________________________________________________ 49
IF…Then…Else Statement __________________________________________________________________ 49

If…Then…ElseIf Statement _________________________________________________________________ 50
Conditional and Logical Operators ___________________________________________________________ 50

Repetition: ______________________________________________________________________________ 51
For…Next loop ___________________________________________________________________________ 51




The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 4 of 75

Class 8

Do…Next loop ___________________________________________________________________________ 51

Mouse Events ___________________________________________________________________________ 52
Functions, Subroutines, and Modules: ________________________________________________________ 53

Creating User-Defined Functions: ___________________________________________________________ 53
Modules: _______________________________________________________________________________ 54

Creating a Good User Interface: _____________________________________________________________ 55
Bad User Interfaces: ______________________________________________________________________ 56

Program Debugging and Error Handling: _____________________________________________________ 57

Programming Robots and Single-Board Computers _____________________________________ 59

What is a Single Board Computer?___________________________________________________________ 59
Raspberry Pi ____________________________________________________________________________ 59

Exploring the Raspberry Pi _________________________________________________________________ 59
Here’s a Glance of What Each Component of a Raspberry Pi Does: _________________________________ 59

Accessories Needed for the Raspberry Pi: _____________________________________________________ 60
Raspberry Pi Architecture: _________________________________________________________________ 60

General Purpose Input Output (GPIO): ________________________________________________________ 60
Ports: __________________________________________________________________________________ 60

Raspbian OS ____________________________________________________________________________ 61
Python Basics: ___________________________________________________________________________ 61

Variables _______________________________________________________________________________ 62
Values: _________________________________________________________________________________ 62

LIST in Python: ___________________________________________________________________________ 62
Delete and Add List Elements: ______________________________________________________________ 63

Python Conditions and If Statements _________________________________________________________ 63

IF _____________________________________________________________________________________ 63
Elif for Multiple Conditions _________________________________________________________________ 63
Else ___________________________________________________________________________________ 64

Conditional Operators & Logical Operators: ___________________________________________________ 64

Python ‘For’ Loops _______________________________________________________________________ 64
Python Functions_________________________________________________________________________ 64
First Python Program with Raspberry Pi: ______________________________________________________ 65

Blinking LED Program: ____________________________________________________________________ 66

Button Controlled LED: ____________________________________________________________________ 66
Interfacing with SONAR Sensor: _____________________________________________________________ 67




The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 5 of 75

Class 8

Interfacing Servo Motor: __________________________________________________________________ 68

Building a Smart Robotic Car: _______________________________________________________________ 69
Pi Shield: _______________________________________________________________________________ 70

Connectivity of components on Pi Shield: _____________________________________________________ 70
Bumble Pi Programming: __________________________________________________________________ 72

Making a Bootloader: _____________________________________________________________________ 74

References _____________________________________________________________________ 75






































































The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 6 of 75

Internet Search Techniques and e-Safety Class 8


Internet Search Techniques and e-Safety

Key Learning Points:

This chapter focuses on the use of search engines to extract the required information. The practical
component of this chapter allows students to use different search engines to extract information on
any topic by using appropriate “keywords”.




















Search Engine:

A search engine is designed to search for information on the World Wide Web by using specified
keywords. The search results are usually presented in a list commonly called hits. The information
may consist of web pages, images, information and other types of files. Below are some of the most
common search engines:

1. www.google.com For generally searching for anything.

2. www.images.google.com For image searching.
3. www.scholar.google.com For educational and research type searches

4. www.books.google.com For online books search
5. www.yahoo.com For generally searching for anything.

6. www.duckduckgo.com For organic Searching.

How a Search Engine Works:

Internet search engines are special sites on the web that are designed to help people find
information stored in other sites. There are differences in the ways various search engines work, but
they all perform three basic tasks:
1. They search the Internet -- or select pieces of the Internet -- based on important words.
2. They keep an index of the words they find, and where they find them.
3. They allow users to look for words or combinations of words found in the index of words.
Early search engines held an index of a few hundred thousand pages and documents and received
maybe one or two thousand inquiries each day. Today, a top search engine will index hundreds of
millions of pages, and respond to tens of millions of queries per day. Google receives over 63,000
searches per second on any given day. That's the average figure of how many people use Google a
day, which translates into at least 2 trillion searches per year, 3.8 million searches per minute, 228
million searches per hour, and 5.6 billion searches per day.






The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 7 of 75

Internet Search Techniques and e-Safety Class 8


Search engines are very different from subject directories. While humans organize and catalogue
subject directories, search engines rely on computer programs called spiders or robots to crawl the
Web and log the words on each page. With a search engine, keywords related to a topic are typed
into a search "box." The search engine scans its database and returns a file with links to websites
containing the word or words specified. Because these databases are very large, search engines
often return thousands of results. Without search strategies or techniques, finding what you need
can be like finding a needle in a haystack.

Internet Searching Strategies:
Nowadays keywords search on search engines based on improper or slang language which also
results in improper outcomes. To use search engines effectively, it is essential to apply techniques
that narrow results and push the most relevant pages to the top of the results list. Below are several
strategies for boosting search engine performance.

1. Identify Keywords
When performing a search, break down the topic into key concepts. For example, to find
information on what the FCC has said about the wireless communications industry, the keywords
might be:
FCC wireless communication


2. Boolean AND
Connecting search terms with AND tells the search engine to retrieve web pages containing ALL the
keywords:
FCC and wireless and communication
The search engine will not return pages with just the word FCC. Neither will it return pages with the
word FCC and the word wireless. The search engine will only return pages where the words FCC,
wireless, and communication all appear somewhere on the page. Thus, AND helps to narrow your
search results as it limits results to pages where all the keywords appear.

3. Boolean OR
Linking search terms with OR tells the search engine to retrieve web pages containing ANY and ALL
keywords.
FCC or wireless or communication
When OR is used, the search engine returns pages with a single keyword, several keywords, and all
keywords. Thus, OR expands your search results. Use OR when you have common synonyms for a
keyword. Surround OR statements with parentheses for best results.
To narrow results as much as possible, combine OR statements with AND statements.
For example, the following search statement locates information on purchasing a used car:
(Car or automobile) and (buy or purchase) and used

4. Boolean AND NOT
AND NOT tells the search engine to retrieve web pages containing one keyword but not the other.
Dolphins and not Miami
The above example instructs the search engine to return web pages about dolphins but not web
pages about the "Miami Dolphins" football team. Use AND NOT when you have a keyword that has





The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 8 of 75

Internet Search Techniques and e-Safety Class 8


multiple meanings. The need for AND NOT often becomes apparent after you perform an initial
search. If your search results contain irrelevant results (e.g., Saturn the car rather than Saturn the
planet), consider using AND NOT to filter out the undesired websites.

5. Implied Boolean: PLUS & MINUS (+ & -)
In many search engines, the plus and minus symbols can be used as alternatives to full Boolean AND
and AND NOT. The plus sign (+) is the equivalent of AND, and the minus sign (-) is the equivalent of
AND NOT. There is no space between the plus or minus sign and the keyword.
NOTE: AltaVista's Simple Search requires the use of plus and minus rather than AND, OR, and AND
NOT.
+welding +process
+Saturn -car
couch sofa

Ethical Citation:
it's important to cite sources you used in your research for several reasons:
• To show your reader you've done proper research by listing sources you used to get your
information.
• To be a responsible scholar by giving credit to other researchers and acknowledging their
ideas.
• To avoid plagiarism by quoting words and ideas used by other authors.
• To allow your reader to track down the sources you used by citing them accurately in your
paper by way of footnotes, a bibliography or reference list.

What is Digital Citizenship?

If you are a citizen, this means you belong to a group of people. You could be a citizen of your
classroom or your neighbourhood. Being a digital citizen means you are a part of the group of people
that use technology to communicate. There are rules that you need to follow when you are a digital
citizen, to protect yourself and to protect others.

What is Digital Resilience?

A digitally resilient person will be able to:
• Understand when they are at risk online.
• Know what to do to seek help.
• Learn from their experiences.
• Recover when things go wrong.

Cyber Bullying:
Cyberbullying is bullying that occurs online, often through instant messaging, text messages, emails,
and social networks. If someone is repeatedly unkind or harasses another person online, then they
are a cyberbully. Cyberbullying usually involves people you know. It is often accompanied by
traditional, offline, bullying.






The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 9 of 75

Internet Search Techniques and e-Safety Class 8


Examples of Cyber Bullying:

• Writing hurtful things through instant messaging, text messaging, or online games
• Posting derogatory messages on social networking sites
• Posting or sharing embarrassing photos or videos
• Creating a fake profile to humiliate someone

How to Avoid Cyberbullying:
• Don't reply to the bully.
• If possible, block messages from the bully.
• Keep all emails and other messages that the bully sends.
• Report the bullying to a parent or trusted adult.

Fake News:

You may have heard of the term ‘fake news’ talked about in the media or between friends. There are
different types of fake news. Some fake news is deliberately made up stories or images to make
people believe something that isn’t true.
Others have some truth to them, but may be misleading, including some false information that
hasn’t been checked properly or with facts that have been exaggerated by the author.
• Has the story been repeated elsewhere? Check other reputable sites.
• Does the image look believable? Is it used elsewhere? For example, an edited photo of a
pink giraffe flying across the moon is a big clue that the story isn’t real!
• Does the web address (URL) look strange? Or is it from a trusted site?
• Do you know who the author is? Have you heard of the organization reporting it?
• Are you familiar with the organization or company? Are they reputable?

Anybody can make mistakes online. Even if you are careful, accidents can happen. You may feel
unsafe and people can be unkind. Sometimes bad things happen. Don’t worry, it isn’t your fault. The
most important thing is that you know how to get help and recover. Thinking about what you do
online, and getting support, will help you to recover – from whatever has happened. You can even
learn from your experience and become more resilient. What will you do when things go wrong
online?

Pop-Up Blocking:
Sometimes messages pop up in a small window on the screen when you open certain websites.
Often the popups are adverts for products and services and other times they are phishing scams
asking you to enter personal details to claim an unbelievable prize. You should avoid clicking on the
popup links just in case they are unreliable or a scam. This term in the online world is also called
Click-Bait. You can just close them by clicking the only the small x on the top right-hand corner of the
popup box.

Live Streaming:
Live streaming is the broadcasting of real-time, live, video to an audience over the internet. All you
need is an internet-enabled device, such as a smartphone or tablet, and a platform to broadcast on.




The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 10 of 75

Internet Search Techniques and e-Safety Class 8



Some of the Risks of Live Streaming:

• You never know who’s watching – if your live stream is popular with loads of viewers it
might be promoted so people who don’t follow you can tune in too if your profile is public.
• You never know what you’re going to see – when watching someone else’s live stream, you
can never tell what’s about to happen. This can be part of the fun of live streaming. But you
might be exposed to harmful or upsetting content by other users.
• Not all viewers are friendly – viewers can comment on your live stream as it happens, and
their comments might be mean, rude or inappropriate and can make you feel sad or scared.
• Letting people know where you are – you should be mindful of what you’re revealing in your
live stream. If you’re in your school uniform or close to your house, you could be letting
strangers know where you go to school and where you live, even if you don’t verbally say it.

Password Protection:

A password is a secret word, phrase or combination of characters that allows you access to
protected information or an account.
A strong password is one that is secure and not easy to guess. It can be used to help protect your
information online, keeping it private.

Here are Some Handy Tips:

• Create different passwords for different accounts.
• Choose a password that is not easy to guess.
• Use a mixture of numbers, characters and lower and upper-case letters.
• Avoid obvious words such as your name or your pet’s name.
• Avoid obvious numbers such as your date of birth, age or phone number.
• Instead of just one word, think of a short phrase that nobody would guess.
• Keep your passwords secret, even from your best friend!

Privacy Protection:
It is important to protect your information when you’re online and think carefully about what it is ok
to share and make public for everyone to see and what it is best to keep private.

Sharing too much personal information such as your full date of birth or your full name and address
could leave you vulnerable for several reasons:
• There are identity thieves who may try to steal your personal information to create an
identity.
• Identity thieves may use your information to pretend to be you online.
• There are some people who want to harm and harass others online.













The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 11 of 75

Internet Search Techniques and e-Safety Class 8




























































































The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 12 of 75

Advanced Imaging Class 8


Advanced Imaging

Introduction:

Adobe Photoshop CC 2018 is a popular image editing software that provides a work environment
consistent with Adobe Illustrator, Adobe InDesign, Adobe Photoshop, and other products in the
Adobe Creative Suite although Adobe Photoshop is a raster-based graphic software.

What are Raster Graphics?
In computer graphics, a raster graphics or
bitmap image is a dot matrix data structure that
represents a generally rectangular grid of pixels
(points of colour), viewable via a monitor, paper,
or other display media. Raster images are stored
in image files with varying formats.
A bitmap is a rectangular grid of pixels, with each pixel's colour being
specified by a number of bits. A bitmap might be created for storage in
the display's video memory or as a device-independent bitmap file. A
raster is technically characterized by the width and height of the image
in pixels and by the number of bits per pixel (or colour depth, which
determines the number of colours it can represent).

Introduction of Adobe Photoshop interface:















































The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 13 of 75

Advanced Imaging Class 8


Menu Bar

If you look at the top of the screen you will see the Menu bar, which contains all the main
functions of Photoshop, such as File, Edit, Image, Layer, Type, Select, Filter, Analysis, 3D, View,
Window, and Help.
Toolbar
Most of the major tools are located in the Toolbar for easy access.
The Image
The image will appear in its own window once you open a file.
Image Name

The name of any image that you open will be at the top of the image window as shown above.
Palettes

Palettes contain functions that help you monitor and modify images. By default, palettes are stacked
together in groups. These are the palettes that are usually visible: Colour, Adjustments and Layers. If
none of the palettes is visible, go to Window in the Menu bar and choose the palettes you need.
Colour, Swatches, Style

The Colour palette displays the current foreground
and background colours and RGB values for these
colours. You can use the sliders to change the
foreground and background colours in different
colour modes. You can also choose a colour from the
spectrum of colours displayed in the colour ramp at
the bottom of the palette.





In the Swatches palette, you can choose a
foreground or background colour and add a
customized colour to the library.







The Styles palette allows you to view, select, and
apply pre-set layer styles. By default, a pre-set style
replaces the current layer style. You can use the
styles in the palette or add your own using the
Create New Style icon.














The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 14 of 75

Advanced Imaging Class 8


Understanding of resolution, colour depth and colour mode.

Resolution
PPI & DPI (Pixel per inch and Dots per inch respectively) are the standard units for measuring image
size. Resolution is the number of pixels on a printed area of an image. The higher the resolution, the
more pixels there are on the page, the better the quality of the image. However, high resolution
increases the size of the file. The standard recommended resolution for printed images is 150-300
dpi, for Web images it is 72 dpi.

Colour Mode
Choose a colour mode that will best fit your project. For example, when making a graphic for a web
site, choose RGB. When making an image for print choose CMYK.

Resizing to a Specific Size, Enlarging, and Compressing.

To resize your image to different size:
1. In the main menu, go to Image > Image Size.
2. In the Image Size dialogue box, you can readjust
your image by typing in the width and height that is
needed for your resizing. An important reminder is
that if your document is not already 300ppi or a
high-resolution photo, making your image
drastically larger than what it already is can distort
the document, thus the same for making a large
document smaller. Photoshop measures in pixels,
so altering sizes of a photo can reduce the quality.
It is best to adjust size first before doing any editing.
1. Under Dimensions, you can see your original document size. If you use the drop-down
arrow, you can see different units of measurements for your document. Use the original size
to determine the proportions for your resizing.
2. Adjust your new height and width by typing in the desired new proportions.
3. Type in your desired resolution
4. (150-300 PPI for high-quality prints and 72 PPI is good for web images).
5. Have the Resample checked to tell Photoshop to try and keep your pixels together if you are
making a drastic change.
6. Click OK.
7. Your document should be now of the desired proportions, if you are dissatisfied, you can
hold Ctrl+Z to undo the sizing adjustment, or you can use the crop tool to get the desired
look.

Colour Adjustment

Colour adjustment options in Photoshop CC 2018 can help you to make your digital photos look
more natural. To colour correct your images, follow these steps:
1. Open the image you wish to correct.







The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 15 of 75

Advanced Imaging Class 8


2. In the main menu, go to Image > Adjustments > Levels. You will see a dialogue box displaying
a diagram of the colours in your image (Figure 30). The black triangle is for shadows, the
grey is for mid-tones, the white is for highlights. In the Channels dropdown menu, you can
choose between RGB. These indicate whether your changes affect all the colours, or just one
(red, green, or blue).

























Levels window Underexposed photo

3. Make sure the Preview box is checked off. Choose the channel you wish to change and drag
the triangles. Dragging the black triangle to the right will make the shadows in your photo
darker. Dragging the white triangle to the left will make the highlights in your photo lighter.
Dragging the grey triangle to the left will make the mid-tones in your photo lighter, and
dragging it to the right will make the mid-tones darker. You will be able to see the changes
in your image. (Underexposed photo) shows a photo which is underexposed. By correcting
the highlights and making the image lighter, we can make the photo appear much brighter
(Corrected photo).

























Corrected photo







The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 16 of 75

Advanced Imaging Class 8


Selection Tools:

Move:
Used to select and move objects on the page. Click the tool button, then click on any object on the
page you wish to move.

Marquee:
Selects an object by drawing a rectangle or an ellipse around it.
Click the tool button, choose a rectangular or an elliptical marquee. Drag the marquee over the area
of the image you wish to select.
Lasso:
Selects an object by drawing a freehand border around it.
Click the tool button, drag to draw a freehand border around the area of the image you wish to
select.

Magic Wand:

Selects all objects in a document with the same or similar fill colour, stroke weight, stroke colour,
opacity or blending mode. By specifying the colour range or tolerance, you can control what the
Magic Wand tool selects.

Transformation Tool:

Select the area of your image which you want to transform and press Ctrl+T to enable the
transformation tool on that selection. You will see a familiar transformation tool around your object.

Vertical
Transform
Rotation


Horizontal
Transform

Corner
Transform



























The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 17 of 75

Advanced Imaging Class 8


Understanding Layers and How They Work:

Layers:
Layers let you organize your work into distinct levels that can be edited and viewed as individual
units. Every Photoshop CC document contains at least one layer. Creating multiple layers lets you
easily control how your artwork is printed, displayed, and edited. You will use the Layers palette
often while creating a document, so it is crucial to understand what it does and how to use it.
1. Layer Visibility -The eye shows that the selected layer is
visible. Click on or off to see or to hide a layer.
2. Layer Locking Options -Click the chequered square icon to
lock Transparency, click the brush icon to lock the Image,
click the arrow icon to lock the Position, and click the lock
icon to lock all options.
3. Layer Blending Mode -Defines how the layer’s pixels blend
with underlying pixels in the image. By choosing a
particular blending mode from the drop-down menu you
can create a variety of special effects.
4. Fill -By typing in a value or dragging the slider you can
specify the transparency.
5. Opacity -By typing in a value or dragging the slider, you can specify the transparency of the
entire layer.
6. Layer Mask -Allows you to hide certain parts of the layer, which can then be revealed by
using the paintbrush and the white paint colour to expose portions of the layer.
7. Create New Fill or Adjustment Layer -Have the same opacity and blending mode options as
image layers and can be rearranged, deleted, hidden and duplicated in the same manner as
image layers. Click the icon and select an option to create a new fill or adjustment layer.
8. Create New Layer -Click this icon to create a new layer.
9. Layer Lock -The icon shows when the layer is locked and disappears when it is unlocked.
Double-click the icon to unlock the layer.
10. Link Layers – Can be used to link layers together.
11. Layer Styles -If a layer has a style, an “F” icon shows at the bottom of the Layers palette.
Click the little black triangle to see style options.





























The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 18 of 75

Advanced Imaging Class 8


Image Adjustments and Enhancements:

Filters and Effects:
A can be applied to the active layer or a Smart Object. Filters applied to a Smart Object are non-
destructive and can be readjusted at any time.

Do one of the following:
• To apply a filter to an entire layer, make sure the layer is active or selected.
• To apply a filter to an area of a layer, select that area.
• To apply a filter non-destructively so you can change your filter settings later, select the
Smart Object that contains the image content you want to filter.

Filter Gallery:
The Filter Gallery provides a preview of many of the special effects & filters. Multiple filters can be
applied/used on the same object/image, turn on or off the effect of a filter, reset options for a filter,
and change the order in which filters are applied. When you are satisfied with the preview, you can
then apply it to your image. Press Ctrl+F to open the filter gallery.

A. Preview B. Filter category C. Thumbnail of selected filter D. Show/Hide filter thumbnails E. Filters
pop‑up menu F. Options for selected filter G. List of filter effects to apply or arrange H. Filter effect
selected but not applied I. Filter effects applied cumulatively but not selected J. Hidden filter effect















































The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 19 of 75

Advanced Imaging Class 8


Apply a gradient fill:

The Gradient tool creates a gradual transition between multiple colours. You can choose from pre-
set gradient fills or create your own. Gradient tool cannot be used with the bitmap or indexed-colour
images.

1. To fill part of the image, select the desired area. Otherwise, the gradient fill is applied to the
entire active layer.
2. Select the Gradient tool . (If the tool isn’t visible, hold down the Paint Bucket tool.)
3. In the options bar, choose a fill from the wide gradient sample:
4. Select an option to determine how the starting point (where the mouse is pressed) and
ending point (where the mouse is released) affect gradient appearance.

Linear Gradient Shades from the starting point to the ending point in a straight line.








Radial Gradient Shades from the starting point to the ending point in a circular pattern.








Angular Gradient Shades in a counter-clockwise sweep around the starting point.








Reflected Gradient Mirrors the same linear gradient on either side of the starting point.








Diamond Gradient Shades from the middle to the outer corners of a diamond pattern.













The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 20 of 75

Advanced Imaging Class 8


Border, Shadow, Bevel & Emboss:

In Photoshop all layers can be individually customizable in various aspects, for Layer Style option
double click on the layer from the layer panel:

Layer styles use to apply effects, such as colour overlays, drop
A. Layer effects icon B. Click to
shadows, glow, or bevel & emboss, to the primary layer. To
expand and show layer effects
create a rollover pair, turn the layer style on or off and save the
C. Layer effects
image in each state.






















Drop Shadow:
Adds a shadow that falls behind the contents on the layer.
Outer Glow and Inner Glow:
Add glows that emanate from the outside or inside edges of the layer’s content.
Bevel and Emboss:

Add various combinations of highlights and shadows to a layer.
Colour, Gradient, and Pattern Overlay
Fills the layer’s content with a colour, gradient, or pattern.
Stroke as Borders

Outlines the object on the current layer using colour, a gradient, or a pattern. It is particularly useful
on hard-edged shapes such as type.

























The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 21 of 75

Advanced Imaging Class 8


Scale & Rotate:

The Free Transform command lets you apply transformations (rotate, scale, skew, distort, and
perspective) in one continuous operation. You can also apply a warp transformation. Instead of
choosing different commands, you simply hold down a key on your keyboard to switch between
transformation types.



1. Select what you want to transform.
2. Open Edit Menu > Free Transform (Short Key
Ctrl+T).
3. To scale by dragging, drag a handle. Press
Shift as you drag a corner handle to scale
proportionately.
4. To rotate by dragging, move the pointer
outside the bounding border (it becomes a
curved, two-sided arrow), and then drag.
Press Shift to constrain the rotation to 15°
increments.


A. Original image B. Layer flipped C. Selection
border rotated D. Part of object scaled
Layer Opacity and Blending:
Layer Opacity

A layer’s overall opacity determines to what degree it obscures or reveals the layer beneath it. A
layer with 1% opacity appears nearly transparent, whereas one with 100% opacity appears
completely opaque.
In addition to overall opacity, which affects layer styles and blending modes applied to a layer, you
can specify fill opacity. Fill opacity affects only pixels, shapes, or text on a layer without affecting the
opacity of layer effects such as drop shadows.
1. In the Layers panel, select one or more layers or groups.
2. Change the Opacity and Fill values. (If you selected a group, only
Opacity is available.)

Layer Blending:

By default, the blending mode of a layer is Pass Through, which means that the layer has no blending
properties of its own. When you choose a different blending mode for a layer, you effectively change
the order in which the image components are put together. Choose a blending mode other than
Pass Through for the layer.















The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 22 of 75

Advanced Imaging Class 8


More Blending Mode Examples:

These examples show the result of painting part of the image’s face using each blending mode.






















Hue and Saturation:

The Hue/Saturation command adjusts the Hue (colour), Saturation (purity), and Lightness of the
entire image or individual colour components in an image.

Use the Hue slider to add special effects, to colour a black and white image (like a sepia effect), or to
change the range of colours in a portion of an image. This adjustment is especially good for fine-
tuning colours in a CMYK image.

1. Image Menu > Adjustment > Hue/Saturation. (Short key
Ctrl+U)
2. Choose Master to adjust all colours at once. OR Choose one of
the other pre-set colour ranges listed for the colour you want
to adjust. To modify the colour range.





































The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 23 of 75

Advanced Imaging Class 8


Perspective Crop Tool:

A much easier and faster way to correct
images that suffer only from perspective
distortion is to use the Perspective Crop
Tool.
1. In this case, we will be extracting the
painting from the wall.
2. Select the Perspective Crop Tool
from the Tools panel.
3. Click and drag to create a rectangle
that covers your whole image.
4. Drag the corner handles so that the
horizontal and vertical lines of the
grid align with the respective lines of
your subject.
5. Press Enter to crop.

Use of Retouch Tools:

Retouch with the Healing Brush tool: The Healing Brush tool lets you correct imperfections,
causing them to disappear into the surrounding image. Like the cloning tools, you use the Healing
Brush tool to paint with sampled pixels from an image or pattern. However, the Healing Brush tool
also matches the texture, lighting, transparency, and shading of the sampled pixels to the pixels
being healed. As a result, the repaired pixels blend seamlessly into the rest of the image
1. In this example by using the healing tool, we will remove the bird.
2. Select the Healing Brush tool
3. Specify the source for repairing pixels by holding the Alt key and left-click and release the Alt
key.
4. Use the Healing brush on the effected are i.e. bird, healing tool will use the pixels from the
source and adjust on the destination.

Before After



























The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 24 of 75

Advanced Imaging Class 8



Retouch with the Clone Stamp Tool: The Clone Stamp tool paints one part of an image over
another part of the same image or over another part of any open document that has the same
colour mode. You can also paint part of one layer over another layer. The Clone Stamp tool is useful
for duplicating objects or removing a defect in an image.
1. In this example using the Clone Stamp tool, we will add another hot air balloon.

2. Select the Clone Stamp tool
3. Specify the source for copying the pixels by holding the Alt key and left-click and release the
Alt key.
4. Use the Clone Stamp tool on a similar place where you want to paste the hot air balloon.
Clone Stamp tool will use the pixels from the source and paste it on the destination.

Before After

















Saving images for web and print media.

Saving image for Print Media:
Originally when we are working in Photoshop with layers and objects Photoshop saves the
document in PSD format whereas if need to save the picture for print media it is recommended to
save images in JPEG format with the resolution up to 200 to 300 DPI, saving the image at this
resolution avoids pixelation at a later stage. To save an image in Photoshop follow these steps:

1. Click on File Menu.
2. Click Save As (Short Key Ctrl+Shift+S).
3. Type the name for the picture
4. Select a file format for your image.
5. Click the save button.
























The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 25 of 75

Advanced Imaging Class 8


Saving an Image for the Web:

While saving pictures for the web we have to be careful about the size of the file as on web we
always keen to keep the file size smaller, this helps the website to load quickly as all the content on
webpage downloaded on your computer via the internet. Therefore, it is highly recommended to
save files intended for webpages in a smaller size. The recommended format is GIF, PNG and JPEG.

1. Click on File Menu.
2. Click Save for Web (Short Key Ctrl+Alt+Shift+S).
3. Select Fit on Screen to check the overall look of the image.
4. Select an appropriate file format.
5. Set your required quality.
6. Check the estimated file size to meet the desired requirement.
7. Click the Save button to save the file.







Select
appropriate
file format


Set
appropriate
quality


Estimated
file size

Select fit
on screen


































The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 26 of 75

Handling Databases Class 8


Handling Databases with Research

What is a Database:

A structured set of data held in a computer, especially one that
is accessible in various ways is called Database. A database is
usually controlled by a database management system (DBMS).
Together, the data and the DBMS, along with the applications
that are associated with them, are referred to as a database
system, often shortened simply to database.

The common language among electronic database is SQL. It
works at the backend of most of the user interface in any
application. MS Access is one of the software which uses the
same structure of SQL. Relational Database Management System
(RDBMS).


Introduction to MS Access:

Microsoft Access is a database management system (DBMS) from Microsoft that combines the
relational Microsoft Jet Database Engine with a graphical user interface and software-development
tools. Access is an easy-to-use tool for creating business applications, either from templates or from
scratch. With its rich and intuitive design tools, Access can help in creating appealing and highly
functional applications in a minimal amount of time.


MS Access User Interface:












































The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 27 of 75

Handling Databases Class 8


Use of Data Types in Databases:

Every field in a table has properties and these properties define the field's characteristics and
behaviour. The most important property for a field is its data type. A field's data type determines
what kind of data it can store. MS Access supports different types of data, each with a specific
purpose. Here are some of the most common data types you will find used in a typical Microsoft
Access database.

Type of Data Description

Text or combinations of text and numbers, including numbers that do not
Short Text
require calculating (e.g. phone numbers).
Long Text Lengthy text or combinations of text and numbers.

Number Numeric data used in mathematical calculations.
Date/Time Date and time values for the years 100 through 9999.
Currency values and numeric data used in mathematical calculations involving
Currency
data with one to four decimal places.
A unique sequential (incremented by 1) number or random number assigned
AutoNumber
by Microsoft Access whenever a new record is added to a table.
Yes and No values and fields that contain only one of two values (Yes/No,
Yes/No
True/False, or On/Off).

Organize and create tables:

The basic process of starting Access and
creating a database:
1. To create a database from a
template, we first need to open
MS Access.
2. Select Blank desktop database.
Enter the name and click the
Create button.
3. Access will create a new blank
database and will open up the
table which is also completely
blank.
4. After selecting a template
related to your requirements,
enter a name in the File name
field and you can also specify
another location for your file if
you want and save it with your
relevant name.











The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 28 of 75

Handling Databases Class 8


When you create a database, you store your data in tables. You should always start your design of a
database by creating all of its tables and then creating any other object. Before you create tables,
carefully consider your requirements and determine all the tables that you need.
Create the first table that will store the basic contact information concerning the employees as
shown in the following table:

Field Name Data Type
EmployeelD AutoNumber
FirstName Short Text
LastName Short Text
Address1 Short Text
Address2 Short Text
City Short Text
State Short Text
Zip Short Text
Phone Short Text
Phone Type Short Text

Go to the Field tab and you will see that it is also automatically created. The ID which is an
AutoNumber field acts as our unique identifier and is the primary key for this table.

The ID field has already been created and we now want to rename it to suit our conditions. This is an
Employee table and this will be the unique identifier for our employees.

Click on the Name & Caption option in the Ribbon and you
will see the following dialogue box.

Change the name of this field to EmployeeID to make it
more specific to this table. Enter the other optional
information if you want and click Ok.

We now have our employee ID field with the caption
Employee ID. This is automatically set to an auto
number so we don't really need to change the data
type.

Now add some more fields by clicking on click to add.

Choose Short Text as the field. When you choose short text,
Access will then highlight that field name automatically and all
you have to do is type the field name.












The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 29 of 75

Handling Databases Class 8


Type FirstName as the field name. Similarly, add
all the required fields as shown in the table
above.

This can also be accomplished using the Design
View method. Right-click the table name and click on Design View.

Add the rest of the relative fields with their respective data
types.

Once we type the field name MS Access will automatically
assign the SHORT TEXT data type to the field which can be
modified as per our requirement from the drop-down menu.

This drop-down menu can be accessible by simply clicking on
the short text field. Once all the fields are added, click the
Save icon.

You will now see the Save As dialogue box, where you can
enter a table name for the table. Enter the name of your
table in the Table Name field. Here the tbl prefix stands for a
table. Click Ok and you will see your table in the navigation
pane.


Create Relationships Between Tables Using Primary Key & Foreign Key:
MS Access uses table relationships to join tables when you need to use them in a database object.
There are several reasons why you should create table relationships before you create other
database objects, such as forms, queries and reports.

To work with records from more than one table, you often must create a query that joins the tables.

The query works by matching the values in the primary key field of the first table with a foreign key
field in the second table.

When you design a form or report, MS Access uses the information it gathers from the table
relationships you have already defined to present you with informed choices and to prepopulate
property settings with appropriate default values.


Primary Key

A primary key, also called a primary keyword, is a key in a database that is unique for each record. It
is a unique identifier, such as a driver license number, telephone number (including area code), or






The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 30 of 75

Handling Databases Class 8


vehicle identification number (VIN). A relational database must always have one and only one
primary key. Primary keys typically appear as columns in relational database tables.

When you design a database, you divide your information into tables, each of which has a primary
key and then add foreign keys to related tables that reference those primary keys.
These foreign key-primary key pairings form the basis for table relationships and multi-table queries.
























Foreign Key:

A foreign key is a column or group of columns in a relational database table that provides a link
between data in two tables. It acts as a cross-reference between tables because it references the
primary key of another table, thereby establishing a link between them.

Constraints in Database:
In a database when we define any field as a Primary Key (PK) there are two rules or constraints
applied to that field automatically.

NOT NULL: This constraint enforces that this field cannot be left unused. In Database terminology,
NOT NULL is not considered as empty or zero, it just defined as the data has not been entered yet.

Unique: This constraint enforces that the data entered in this field cannot be repeated or all the
values entered should be unique to each other.

Creating Relationships in MS Access:

For creating relationships in our database, we
need another table and will name it tblHRData
using Table Design as shown in the image.
Make sure to select the relevant data type
according to fields.
After entering the fields name and assigning them their relevant data type save the table and you
will notice that a dialogue box will appear with the exclamation mark suggesting:








The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 31 of 75

Handling Databases Class 8










At this point, click CANCEL and right-click on the EmployeeID row and
click on Primary Key to make the EmployeeID the Primary Key of this
table.

Now we will work with One-to-One Relationship in MS Access. This relationship is used to relate one
record from one table to one and only one record in another table.
Go to the Database Tools tab:
• Click on the Relationships option.
• Select tblEmployee and tblHRData
holding the shift key and then click on the
Add button to add them to our view and
then close the Show Table dialogue box.
• To create a relationship between these two tables, use the mouse,
and click and hold the EmployeeID field from
tblEmployee and drag and drop that field on the field
we want to relate by hovering the mouse right over
EmployeeID from tblHRData. When you release your
mouse button, Access will then open the Edit
Relationships window.
• This window relates EmployeeID of tblEmployee to
EmployeeID of tblHRData. Now click on the Create
button and now these two tables are related.
• The relationship is now saved
automatically and there's no need to click
on the Save button. Now that we have the
most basic of relationships created, let us
now go to the table side to see what has
happened with this relationship.
• Open and enter 5 random records of an
employee in tblEmployees table.
• Here, on the left-hand side of each record,
you will see a little plus sign by default. When
you create a relationship, Access will
automatically add a sub-datasheet to that
table.















The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 32 of 75

Handling Databases Class 8


• Similarly, open and enter the HR details of
these employees in tblHRData.
• Open and click on the plus sign and you will
see the information that is related to this
record is on the tblEmployee table.
• This data is visible on this table due to the
relationship of mutual field of Employee ID
on both tblEmployee and tblHRData tables.










































































The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 33 of 75

Handling Databases Class 8


Create Simple and Complex Queries:

Database tables can hold a lot of records, in some cases, millions or billions of them, therefore, if you
want to find a piece of information, you have to filter the records and select which ones you want to
display. To do that, you have to create a query. A query is a special “question” you apply to the
database to find specific data and get the information you want. For this task, let’s continue working
with the Employee table we have used before.

Creating a Query:

• Click on the Query Design option from the create tab.
• A new window will open with the name of Show Table.
• Select and add tbleEmployee and tblHRData.
• Let us suppose that we need the data of our
employees with their first name, last name and
their salaries which are higher than 3500$.
• For the first column select the employee’s first
name.
• In the second column select employee’s last
name.
• In the third column select StartSalary.
• We can get the data from both tables accurately
as both table’s EmployeeID fields are related to
each other using PK and FK.
• After selecting the fields for a query, you can see
the name of fields and other options for Sort and
setting a criterion.
• Select the Ascending option from the first column
(FirstName).
• In the third column enter the criteria for salaries
as preferred. In the example, we have entered
>3500. Which means that employees who have
salaries greater than 3500 will be listed in
ascending order after executing the queries.
• Save the query by using the right click on the
query tab and save it with any preferred name. In
the example, we have saved the query with the
name of Salaries Greater than 3500.
• Close the tab and run the query from the objects
panel.
• In the next example, we assume that we need the
list of employees who have joined after the year
2018.
• We will add the preferred columns along with the
field of HireDate from tblHRData.
• And enter the criteria as >12/30/2008 and press enter.



The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 34 of 75

Handling Databases Class 8


• Save the query with the name of Employees
after 2008 and close and run the query from
the object panel.
• You will see the list of employees who have
joined after that specific date.
• Similarly, we can sort all the employees who
reside in a specific city.
• For a complex level query, we can also take
user inputs using a simple ? symbol for the criteria.
• Save and run the query and this time you will observe a
dialogue box will appear asking parameters.

Create Forms and Reports Through the Wizard:
Forms in Access are like display cases in stores that make it easier to view or get the items that you
want. MS Access is not just a database software, it also gives us the liberty to use it as a software
solution for business organizations, and to fulfil this purpose using forms are one essential part
where a user can access or enter the relevant records in a database. Since forms are objects through
which you or other users can add, edit, or display the data stored in your Access desktop database,
the design of your form is an important aspect.

Creating Forms:
There are a few methods you can use to create forms in Access. One of the easiest ways to create a
form is with a wizard.

• Open your Database and go to the Create tab. In the
Forms group, in the upper right-hand corner, you will
see the Form Wizard button.
• Click on that button to launch the Form Wizard
• On this first screen in the wizard, you can select fields
that you want to display on your form, and you can
choose from fields from more than one table or a
query.
• Let us assume we want to simply have a quick form
that we are going to use for data entry for our
employee information.
• From the Tables/Queries drop-down list, select
tblEmployees table. Click on the double arrow to move
all the fields at once and click next.
• After clicking next, the Form Wizard will ask for the
layout that we would like for our form. We have the
columnar, tabular, datasheet and justified layouts. We
will choose the columnar layout here and then click Next.
• On the next windows we need to give a title to our form
i.e. EmployeeForm.




The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 35 of 75

Handling Databases Class 8


• Once you have given your form a title, there will be
two more options below by which you can open the
form to see what that form looks like, or you can
begin entering information into your table.
• Or you can choose the option to modify the form's
design.
• Choose the first option to open the form to view or
enter information and click Finish.
• Take a look at the following image.
• This is what form looks like.
• This is a single item form, meaning one record is
displayed at a time and further down you can see the
navigation buttons, which is telling us that this is
displaying the record 1 of 5.
• If you click on that button  it will move to the next
record.
• If you want to jump to the very last record in that form
or that table, use the button right beside that right
arrow that's the last record button.
• If you want to add new employee information, press
this button to add a record.


Reports:
Reports offer a way to view, format, and summarize the information in
your Microsoft Access database. For example, you can create a simple
report of phone numbers for all your contacts.


• Open your Database and go to the Create tab. In the
report group, in the upper right-hand corner, you will
see the Report Wizard button.
• Click on that button to launch the Form Wizard
• On this first screen in the wizard, you can select fields
that you want to list on your report, and you can
choose from fields from more than one table or a
query.
• You can also create reports by using the queries
generated by you in printable format.

• Let us assume we want to a report of our records
which are available in two different tables. This report
will consist of employee ID, First name, Last Name,
city, phone and StartSalary. First five fields are from






The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 36 of 75

Handling Databases Class 8


tbleEmployee and one field of StartSalary from tblHRData.
• After adding five fields from tbleEmployee change
the table to tblHRData and add StartSalary field.
• In the next step select the by tblHRData option and
click next.
• In the next window there will be an option for a
grouping a record under any field, which is used for complex reports,
simply click next to the sorting window.
• In this window you can sort the fields as per the preference needed
for the report and click next, options for sorting these fields are
limited to four.
• In the next window select the layout and orientation of your report
as per your preference.
• There would be a checkbox below these settings indicating “Adjust
the field width so all fields fit on a page”. Keep this option checked
as it will automatically adjust all the placement smartly and
properly.
• In the next window name your report as per your preference,
below this option you will see an option for preview and
modification select the
Preview option and click
finish.
• This would be the output
of your report.
• As you can see the
Employee ID heading is
somehow left out. This can be fixed using the design view mode.
nd
• To access the design view mode right click on the Payroll Details Report Tab and click on 2 last
option of design view.
• From this option, you
can resize the fields of
First Name and Last
name a little short to
adjust Employee ID field
like a text box in MS Word.
• Save and close the report and reopen it
from the object menu on the left.

Import and Export Data in MS Access:
In MS Access we can import and export data from multiple sources like MS Excel, MS Access, Text
file (delimited or fixed-width), XML, ODBC Databases (For example, SQL Server). Importing and
exporting data is easy in MS Access using wizards.







The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 37 of 75

Handling Databases Class 8


Importing Data in MS Access:

• Go to External Data Tab and click on the Excel icon.
• After clicking the Excel icon, a wizard will open which will guide
us step by step import process relative to our preference.
• In the wizard window, the first option is to browse to select
the file which we want to import. Click on the Browse button and select the Excel file.
• The excel file we have selected is Sample.xlsx from the Resources folder. In this excel file,
most of the fields are related to our database table tblEmployee thus these fields will fit
appropriately and the fields which do not contain data will be left blank in our database
table.
• After selecting the file there will be three more options available to import the data.
1. Import the source data into a new table in the current database.
2. Append a copy of the records to the table (select the table of our database from the
dropdown).
3. Link to the data source by creating a linked table.
• Select the option as per your preference and click Next. In this example, we have selected
the 2 option to append our existing employee table.
nd
• In the next window, the wizard will ask you to import which excel sheet in our database
table. Select the relevant excel sheet and click next.
• In this window, Access will show
you the preview of the data that
how it will be sorted and if the
data is segregated as per our
requirement click next.
• In this window, Access will reconfirm the name of our
database one last time before proceeding.
• After successfully importing data in our database table Access will show the confirmation
message.
















Open the tblEmployee and check the data imported appropriately, and the fields or data which
doesn’t contain data in Excel sheet are left empty.














The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 38 of 75

Handling Databases Class 8


Exporting Data from MS Access:

• Go to External Data Tab and click on the Text icon.










• Select the file name of the location to save the text file.





• In the next window, Access will show the preview of the text file and also show the two
options to select the format within.























• In the next window, Access will give the option to segregate data using different text
qualifiers. Select your preferred qualifier and click next. The most common used qualifier is
a comma.







• At this step Access will reconfirm the file name and its location on your computer. Click
finish if there are no changes required.







This data can be used in other software using Text or CSV format importing.










The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 39 of 75

Handling Databases Class 8


Microsoft Forms

Microsoft Forms allows Office 365 users to create custom surveys, quizzes, polls and questionnaires
in minutes. It is a great way to ask quick questions and receive feedback or conduct an in-depth
survey with up to 5000 responses. Microsoft Forms allows the content created to be sent as an
invitation to other users and be filled out on any O365 compatible device. The creator can see real-
time results and use inbuilt statistics or export the data for further analysis.

Accessing Forms:

1. Open a web browser and go to http://forms.micsrosoftcom.
2. Log in with your email address and password.

Creating a New Form:
1. From the Forms home page click New Form, which opens a blank form.

























2. Click Untitled form to edit the title and add a description.


















3. The form auto-saves, a save indicator in the top left corner confirms when completed.








4. Click Add question to create content.




The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 40 of 75

Handling Databases Class 8


















5. Choose the type of question: Multiple Choice, Text, Rating, Date or Ranking.











6. Fill in required fields for the selection – available options will change depending on the
question chosen.


































7. For text responses, a long answer option is available. Activate long answer option by clicking
the slider, green indicates option activated.



8. Click Add question to insert additional content.










The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 41 of 75

Handling Databases Class 8


Adding Media to Forms:
1. Click Media to add media (image or video) to a question.









2. Select Image or Video.











To Add an Image:

a. Select Upload.










b. Select an image and click Open.

















To Add a Video:

a. Paste the YouTube URL (web address) of the video into the URL box (this works with
Private, Unlisted and Public YouTube videos).









a. Click Add.







The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 42 of 75

Handling Databases Class 8


Sharing a Form:

Once complete, use the toolbar options to preview, add a theme or share the form.

Preview: Preview the form to see how it looks when viewed on a
computer or mobile device
Theme: Select a colour or theme to apply to the form or upload a
custom banner image
Share: Share the form and choose sharing settings




There are 3 options for Sharing forms: Send and Collect Responses, Share as a Template and Share to
Collaborate.

1. Click Share from the Form toolbar.








2. Choose an audience from the drop-down menu.
Forms sent to people within JCU can be set to record the person’s name, Forms sent to external
email addresses will only record the respondents name as anonymous.

















3. To generate a link for the form, click Copy next to the link box, this link can be emailed or
sent as a message.

























The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 43 of 75

Handling Databases Class 8


View Form Responses:

To view responses, go to https://forms.office.com and open the appropriate form.
Click Responses at the top of the form. When people have completed the form, this is where the
results can be viewed.









Results can be viewed in Excel by clicking Open in Excel.











Viewing Saved Forms:
To view saved Forms or Forms you have been granted edit access to, go to https://forms.office.com

The Forms window has two tabs:

• My forms - Forms you have created
• Other forms - Forms that you have edit access to











Select the appropriate tab to view available saved forms.




























The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 44 of 75

Developing Applications – Visual Studio Class 8


Developing Applications – Visual Studio

This chapter focuses on the use of Microsoft Visual Studio IDE
(integrated development environment), it is used to develop computer
programs, as well as websites, web apps, web services and mobile
apps.
First Visual Basic Program:

As we all know, a Computer program is a set of instructions,
using visual studio IDE we create a Windows form program,
follow the steps below:
1. Open visual studio
2. Click new project
3. Select Windows Forms Application
4. Type name of program “myfirstVBform” and it will be
automatically saved to this location documents\visual
studio 2010\projects
5. On the lower right of the screen, you can see the
Properties Panel which allows you to define various
properties of the currently selected element on the
design view. Some commonly used properties are:
the Text property which defines the title of the
selected element, the Name property which defines
a name with which we can refer to the selected
element in our program’s code (more on that later
on) and the Enabled property which defines if the selected element
will be usable or disabled.
6. Select the text and enter the form title as “First VB form”
7. The form we have created is currently empty and to make it
purposeful we add elements called Controls. There are two types of
basic controls Buttons and Labels. Buttons work to trigger specific
commands whereas labels work as traditional labels to name
something.
8. To access these controls, place the mouse cursor on the extreme left
of the screen where Toolbox is written and click on the pin icon to
show the toolbox panel permanently.
9. To add any control on your form simply drag & drop the control from the toolbox panel to your
form to the preferred location.
10. Add a button and label on your form.
11. While placing these controls on your form gridlines will help you to
place these elements symmetrically.
12. Select the button and change the text to “Say Hello World” from properties panel on the right.
13. Then scroll down the properties panel and in Design section change the
(Name) to btnReaction
14. Do the same with label properties and change the name with
lblReaction




The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 45 of 75

Developing Applications – Visual Studio Class 8


15. The important thing to remember is that the Text property in the Appearance section is for the
text written on it and the Name property in the design section is for giving a name to that
element in order to program it accordingly.
16. Designing of form layout is complete now we will program the control Button so when we click
the button it will trigger the command to show the text in the Label control.
17. Double click on the Button control and a script window will appear where there is a lot of code
already present relative to the button functionality, although we want this button to trigger our
desired text in the Label control.
18. Type the highlighted code between the
two lines as shown in this example:
Now click on the save all icon or press
Ctrl+Shift+S to save the whole project.
19. Click on the debug button or F5 to execute the program in
debugging mode. If there is an error in the program it will
show the warning/problem or else the program will execute.
20. The program window will appear and if you click the Say
Hello World button, the label’s text changes to Hello world!
Exactly as we have programmed.
Each time you test your program by clicking the Start Debugging
button, an application executable file is created in ...\Projects\[project name]\[project
name]\bin\Debug.
For example, for the First VB Form project, the .exe file can be found under
...\Projects\HelloWorldApplication\HelloWorldApplication\bin\Debug\HelloWorldApplication.exe.

Variables:
A variable is a container of data in a computer’s memory where the computer stores the different
types of data and this could be numeric or text. To create and access these Variable (data
containers) we name them so we can call them in our program where it is necessary.

Private and Public Variables

Public variables are variables that are accessible to the whole program. Private variables are
variables that are accessible only to a certain part of the program or code.
Declaring a Private Variable
In visual studio, we can declare the variable by the keyword Dim which is a short form for dimension.
For better understanding, we will create a program using 2 variables and calculate them to see its
working. Follow these steps to create a program with variables in it:

1. Create a new form and name that form
as “Variables”
2. Add 2 text fields from the toolbox in
the form
3. Add 1 button from the toolbox in the
form and change the name of the







The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 46 of 75

Developing Applications – Visual Studio Class 8


button to “Add” from the text option in the properties panel
4. Add 1 label from the toolbox in the form and change the text of the label to “Result” from
the text option in the properties panel
5. Double click on the Add button and enter this code as shown in the example below


Enter this code




Name of Variable Name of text box



Label Calculation of variables



nd
st
• The 1 and the 2 line of code are where we have declared the variables with its data type
which is an integer in this case.
th
rd
• In the 3 and 4 lines, we have declared the value of a variable. In this case, we are taking
the user input from the textbox.
th
• In the 5 line, our code adds the two variables and puts the sum as text into Label1.

6. Click on the debug button or F5 to execute the program in debugging mode.
The “=” here is an assignment operator, a symbol used to assign the value on the right of the
sign to the variable on the left. So here, the content of TextBox1 is stored in variable number1.
Note here that although whatever you write in a text box is considered as String, Visual Basic
automatically converts it to a number since the variable number1 is declared as Integer.

Common Data Types:
Common
language
Variable Type Value range
runtime type
structure
Boolean Boolean True or False
Byte Byte 0 through 255 (unsigned)
Char
(single Char 0 through 65535 (unsigned)
character)
0:00:00 (midnight) on January 1, 0001 through 11:59:59 PM on
Date DateTime
December 31, 9999
0 through +/-79,228,162,514,264,337,593,543,950,335 (+/-
7.9...E+28) with no decimal point; 0 through +/-
7.9228162514264337593543950335 with 28 places to the right
Decimal Decimal
of the decimal;
smallest nonzero number is +/-
0.0000000000000000000000000001 (+/-1E-28)





The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 47 of 75

Developing Applications – Visual Studio Class 8


Common
language
Variable Type Value range
runtime type
structure
lnteger lnt32 -2,147,483,648 through 2,147,483,647 (signed)
Long -9,223,372,036,854,775,808 through 9,223,372,036,854,775,807
lnt64
(Long lnteger) (9.2... E+18) (signed)
Object Object Any type can be stored in a variable of type Object
String
(variable- String (class) 0 to approximately 2 billion Unicode characters
length)

Declaring a Public Variable

Declaring a public variable is not different from declaring a private variable. The only difference is
that the public variable is accessible from anywhere in the whole program. Follow the steps below to
create a program for a simple counter by using a public variable.
1. Create a new form and save it with the name of Simple Counter.
2. Add 2 buttons first with the text of “Reset” and the other one
with the text of “Add” also edit their name to btnRst and btnAdd
from the design section of the properties panel.
3. Add a label and change the text to “Result”.
4. Double click on the Reset(btnRst) button to include the Reset
button to script, by doing this the script window will open, close
the script window and then double click on the Add(btnAdd) to
include it to the script.
5. Now that both elements codes are included in the script, we will create a public variable that
is accessible for both buttons/elements.
Declaration of Public
Variable


Reset button code which will
declare the pub variable to 0.
pub is the public variable
Label1.Text = pub will display
the text of pub variable in
Label1 element


Add button code will add 1 to
the current value of the pub
variable.
Label1.Text = pub will display
the text of pub variable in
Label1 element after adding 1
every time the button is
pressed







The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 48 of 75

Developing Applications – Visual Studio Class 8


Use decisions and repetitions:

Programming is all about giving autonomy to computers as we know computers have limited
intelligence and they can’t make decisions on their own unless we program them to take decisions.
Therefore, decision making is an essential part of programming and that means we can write a
program that will be able to respond to user input during its execution and give different results for
different inputs. This process is possible with the use of conditional statements or If…Then
statements.

IF…Then Statement

Follow the steps below to create a simple program using condition
statements:
1. Create a new form with two labels, one button and one text box
as shown in the example.
2. Edit the first Label text to “Enter your lucky number”
3. Change the name of the text box to “TextboxNumber”
4. Edit the button text to “Try your luck” and change its name to
“btnCheck”
5. Edit 2nd label text to “Result” and its name to “lblResult”
6. Double click on the “Try your luck button” to open the script
window.
7. Enter the code as shown.
8. In the first line, we have declared a
variable “number” as an integer.
9. In the second line, we have assigned
the value of number variable to
TextboxNumber which is a user input
text box.
10. In the third line, we set a conditional statement that if the user input number is greater or
equals to 7 then display the message “Congratulations you win!” in the “lblResult” Label
element.

IF…Then…Else Statement

A more complex version of the conditional statement is the If…Then…Else statement. This allows you
to define instructions to be executed if the condition is false. For example, let’s say we want the
previous program to display a relevant message to the user not only when the correct number is
found but also when a wrong number is inserted.

Make the following
changes to your
existing program’s
code.









The City School /Academics/Computing Curriculum/Class 8/2020-2021 Page 49 of 75


Click to View FlipBook Version