9 2 Chapter 1 Computer Network • Computer Networks enable computers to communicate with each other and share data and information. • Networks can be limited to a building/area (a Local Area Network or LAN) or worldwide such as the internet (a Wide Area Network or WAN). • Transmission Media: means the physical materials that are used to transmit data between computers. Network Devices Modems • Modem means “Modulator Demodulator”. • is a device that converts a computer’s digital signal into an analogue signal for transmission over an existing telephone line. • It also does reverse process, to enable the computer to process the data. There are types of modems: 1. Dial-up modems: don’t tie up the line while accessing to the internet. 2. Modern broadband or ADSL (Asymmetric Digital Subscriber Line) modems: allow telephone conversations and internet connection to occur at the same time. 3. Cables modems: which allow cable television providers to internet access as well as receiving television singles. 1 Hubs • Devices that can have a number of devices or computers connected together. • Used to connect together a number of devices to from a LAN. • It’s take any data packets received at one of its port and broadcast it to every device connected. • Using hub is not secure to data distribution. Switches • Switches are similar to hubs. • Switch checks the data packet received and work out its destination address and sent data to appropriate computer only. • Switches is more secure way to data distribution. • Switches used Media Access Control (MAC) address that uniquely for each device to identifying source device and additional devices should receive the data. Hub It usually has eight or sixteen ports. The data is sent from the originating port to all other ports on the hub at any one time. It does not manage any of the data traffic through it, so transmitting data through the hub is very congested. Switch More intelligent device than a hub and could has 32 or 64 port. A switch knows the addresses of each device attached to it and stores them in the form of an internal table. Any computer is transmitted to its destination without congesting the other ports, this helps to speed up data transmission in a network. 2 Bridge • Devices that connect one LAN to another LAN that use the same protocol. • Used to connect together different parts of a LAN so they can function as a single LAN. • Bridges tend to be used to interconnected LANs (or parts of LANs) since sending out every data packets to all destinations would quickly flood larger networks. Router • Routers sit behind a firewall which protect computers on a network. • Used to transmit internet and transmission protocols between two networks. • Allow private networks (LANs) to be connected together. • Enable data packets to send data from any computer to any device connected to different devices and networks. ➢ Any device on the same network has the same part of an Internet Protocol (IP). ➢ Router is able to send data packets to appropriate switch and it will be delivered using MAC address. ➢ If MAC address doesn’t match any device on the network, it pass it to another switch until the appropriate device is found in the same network. 3 Network Interface Card (NIC) • Used to allow a device to connect to a network. • It is usually part of the device hardware and contains the MAC address generated at the manufacturing. • If the computer already connected to wireless network, it will need to a wireless NIC (WNIC). Network Cables (Transmission Media) • Faster data transfer rates than using wireless networks. • Can be more secure than wireless networks. • Cables can be copper or fiber optics, which offers higher data transfer rate. Internet Service Provider (ISP) • The organization that provides users with access to the internet. • An ISP has the equipment and telecommunications line access required to have internet access. • An ISP can provide also some services on the internet like: ➢ Provides email address ➢ Router to connect to the internet ➢ Domain name to have own website ➢ Storage space to save data in the cloud 4 Internet Protocol (IP) • It’s written in the form: 109.108.158.1 • Each device on the internet is given a unique address when it connects to the internet. • It is assigned by the ISP and is unique for particular internet session. • IP can be change when you change connected network. • Only IP addresses that remain fairly unchanged are the web servers. • An IP address can be used instead of typing in the full URL; for example, http://109.108.158.1 Media Access Control (MAC) addresses • It’s written in the form: 1F-2B-63-84-45-E6 • Unique number that identifies a device connected to the internet. • It is assigned by the device company manufacturing. • MAC address cannot be change when you change connected network. 5 Local Area Networks (LANs) • It’s usually within one building or certainly not very far away from each other. • A typical LAN will consist of number of computers and devices (like, Printers, etc.) that are connected to hubs or switches. • If hubs or switches connected to a router or modem to allow the LAN to connect to the internet; it’s becoming part of WAN. Advantages: • Sharing of resources (Like, software or hardware Printers, etc.) • Ease of communication between users. • A network administrator to control and monitor all aspect of the network. Disadvantages: • Easier spread of viruses throughout the whole network. • Printer queues developing. • Slower access to external networks, such as internet. • Increased security risk when compared to stand-alone computers. • If the main server breaks down, in most cases the network will no longer run. 6 Wide Area Networks (WANs) • Used where computers or networks are located a long distance from each other (like, country). • If a number of LANs are joined together using a router or modem, then they can form a WAN. • The most common examples of WAN include the internet and the network of ATMs used by banks. • WANs usually make use of some public communication network, but they can use dedicated or leased communication lines which can be less expensive and more secure. • A typical WAN will consist of end systems and intermediate systems. • The distance between each system can be considerable, especially if the WAN is run by a multinational company. Advantages: • Multinational organizations can share important data quickly. • WAN which is managed by ISP, connect individuals to the internet. Disadvantages: • Viruses are more commonly transmitted through a WAN than A LAN. • Hackers are more likely to attack servers by accessing a WAN rather than a LAN • If the telecommunication links fail, then communication across a WAN would not be possible. 7 Wireless Local Area Networks (WLANs) • WLANs are similar to LANs but no wires or cables are used. • WLANs use radio or infrared signals because they provide wireless communications over fairly short distances. • Devices, known as Access Points (APs) or wireless nodes, are connected into wired network at fixed locations. • Because of limited range, most commercial LANs (Like, college campus) need several APs to permit uninterrupted wireless communications Access points (APs): devices that connected into the wired network at fixed locations and used to receive and transmit data between the WLAN and the wired network. Advantages: • All computers can access the same services and resources (Like, Printers, Scanners, etc.) from anywhere within range of the access point. • As there is no cable there is a safety improvement and increased flexibility; user no longer has to remain at their desk. • Adding new computers and devices is very easy. Disadvantages: • Security can be a big issue since anyone with a WLAN can access to a network; it’s necessary to adopt complex data encryption techniques. • There may be problems of interference, which can affect the signal. • Wireless networks are relatively slow and the further you are from an access point, the slower the rate of transmission. • Increased risk of hacking (because anyone with a compatible NIC could gain access to WLAN). 8 Network Security Security issues Passwords are used in many instances when accessing the internet, for example when: • Accessing your email account. • Carrying out online banking. • Accessing social networking sites. It is important that passwords are protected; some ways of doing this are described below: • Run anti-spyware software to make sure that your password protected from any spyware. • Change passwords on a regular basis. • Passwords should be strong to guess or break; strong password should contain: ➢ at least one capital letter. ➢ at least one numerical value. ➢ at least one other keyboard character (such as @,#,etc.) ▪ an example of strong password S-125*#as ▪ an example of weak password Ahmed How to protect your data • Firewall: A piece of hardware or software that provide a controllable barrier between a network and external access. • Using anti-spyware which continuously scans a computer system for spyware programs, notifies the user and tries to remove it. • Using antivirus software to scan the incoming data and remove the viruses. • Access levels: You can protect files on your computer by adding another password. This gives you an extra level of security, as anyone wanting to get into your document would first have to log on and then enter the password for your document. 9 • Encryption: changing the data into a code (by scrambling it) which can only be understood by the intended user, i.e. who has the secret key (decryption key)? If the data falls into the wrong hands, it will be meaningless. • Authentication techniques: are used to identify users to a computerbased system or network. There are three factors that can be used in authentication: ➢ Something that belongs to you: magnetic stripes, passports, id card containing data chip, physical tokens. ➢ Something unique about your biometric data like; fingerprints, voice print, facial scan, iris or retina scan. ➢ Something that you know: PIN, username ID, A password or phrase. 10 Chapter 2 Flowchart and Pseudocode Programming Programming Concepts required for practical use of a high-level language. Declaration A Variable in a computer program is a named data store that contains a value that may change during the execution of the program. Variables should be given meaningful names to be understandable to others. For Example: If you want to declare variable called First Name, you should type in these ways: • Make the first letter from each word as Capital, FirstName • Replace space between the word by _ sign, First_Name A Constant in a computer program is a named data store that does not change during the execution of the program. Constant should be given meaningful names to be understandable to others. There is a differentiate between constants and variables but programmers should be clear which data stores can be changed and can’t be changed. There are several ways of doing this. For Example: • Use of capital letters: PI= 3.142 • Meaningful names that begin with Canst: ConstPi = 3.142 Basic Data Type To make a computer system to process and store data effectively, different kinds of data are formally given different types. For Example: • Data to be stored in an appropriate way. • Data to be manipulated effectively. • Automatic validation in some cases. 11 Integer An Integer is a positive or negative whole number that can be used with mathematical operators. Real A Real Number is a positive or negative number with a fractional part. Real Numbers can be used with mathematical operators. For Example: Char A variable or constant of type CHAR is a single character. For Example: String A variable or constant of type STRING is several characters in length. Strings may even have no characters: an empty string. The characters can be letters and/or digits and/or any other printable symbol. For Example: Boolean A Boolean variable can have only two values: TRUE or FALSE. For Example: 12 Using pseudocode is a clear and concise way to represent an algorithm. Data items to be processed by the algorithm are given meaningful names in the same way that variables and constants are in a high-level programming language. Assignment Values are assigned to an item/variable using the operator. The variable on the left of the Arrow is assigned the value of the expression on the right. The expression on the right can be single value or several values combined with mathematical operators. Operator + * / ^ ( ) Action Add Subtract Multiply Divide Raise to the power Group Examples of pseudocode assignments: INPUT and OUTPUT Statements INPUT and OUTPUT are used for the entry of data and display of information. Sometimes READ can be used instead of INPUT. Frequently PRINT is used instead of OUTPUT. INPUT/READ is used for data entry. It is usually followed by a variable. For Example: 13 OUPUT/PRINT is used to display information either on a screen or printed on paper. Usually followed by a single value that is a string or a variable or a list of values separate by commas. For Example: Conditional Statements When different actions are performed by an algorithm according to the values of variables, conditional statements can be used to decide which action should be taken. There are two types of conditional statement: • A condition that can be True or False: IF … THEN … ELSE … ENDIF For Example: • A choice between several different values: CASE … OF … OTHERWISE … ENDCASE For Example: IF … THEN … ELSE … ENDIF Statement For an IF condition the THEN path is followed if the condition followed if the condition is True and the ELSE path is followed if the condition followed if the condition is false. There may or may not be an ELSE path. The end of the statement is shown by ENDIF. A condition can be set up in different ways: • Using a Boolean variable that can have the value True or False. For Example: 14 • Using comparison operators. Comparisons are made from left to right. Comparisons can be simple or more complicated. For Example: Comparison Operators: Operator > < = >= <= <> ( ) AND OR NOT Comparison Greater than Less than Equal Greater than or equal Less than or equal Not equal Group Both Either Not If Statement Example: 15 CASE … OF … OTHERWISE … ENDCASE Statement For a CASE condition the value of the variable decides the path to be taken. Several values usually specified. OTHERWISE, is the path taken for all other values. The end of the statement is shown by ENDCASE. CASE … OF … OTHERWISE … ENDCASE Statement Example: Loop Structures When some actions performed as part of an algorithm need repeating, this is called ‘iteration’. Loop Structures are used to perform the iteration. There are three type of loop structure: Operator A set number of repetitions A repetition, where the number of repeats is not known, that is completed at least once. A repetition, where the number of repeats is not known, that may never be completed. Comparison FOR … TO … NEXT REPEAT … UNTIL WHILE … DO … ENDWHILE NOTE: All types of loops can perform the same task. But you must use the most efficient for the type of task. 16 FOR … TO … NEXT Statement A variable is set up with a start value and an end value and then incremented in steps of one until the end value is reached and the iteration finishes. The variable can be used within the loop so long as its value is not changed. This type of loop is very useful for reading values into lists. FOR … TO … NEXT Statement Example: REPEAT … UNTIL This loop structure is used when the number of repetitions is not known and the actions are repeated UNTIL a given condition becomes true. The actions in this loop are always completed at least once. REPEAT … UNTIL Statement Example: WHILE … DO … ENDWHILE This loop structure is used when the number of repetitions is not known and the actions are only repeated WHILE a given condition is true. If the WHILE condition is false when the loop is first entered then the actions in the loop are never performed. WHILE … DO … ENDWHILE Statement Example: 17 Standard Actions The ability to repeat actions is very important in the design of algorithms. For Example: • Keeping a running total of the value: • Keeping a count of the number of times: • Counting is also used to count down until a certain value is reached: Standard Flowchart Symbols Flowcharts are drawn using standard symbols. Begin/End Terminator symbols (Oval) are used at the beginning and end of each flowchart. Process Process symbols (Rectangle) are used to show when values are assigned to an item/variable. Input/Output Input/Output symbols (Parallelogram) are used show input of data and output of information. Decision Decision symbols (Rhombus/Diamond) are used to decide which action is to be taken next. These can be used for selection and repetition. Flow Lines Flow lines are used to show the direction of flow which is usually, but not always, top to bottom and left to right. 18 Pseudocode and Flowchart Questions: 1. Draw a flowchart & write a pseudocode to add two numbers together and show the result. 2. Draw a flowchart & write a pseudocode to solve the equation 3X+2=Y. 3. Draw a flowchart & write a pseudocode to calculate the area and perimeter for rectangle. 4. Draw a flowchart & write a pseudocode to show word “success” if the number greater than or equal 50. 5. Draw a flowchart & write a pseudocode to show word “Odd” or “Even” for the input number. 6. Draw a flowchart & write a pseudocode to print the numbers from 1 to 20. 7. Draw a flowchart & write a pseudocode to print the multiplication table for number 3. 8. Draw a flowchart & write a pseudocode to print the multiplication table for number input by user. 9. Draw a flowchart & write a pseudocode to the total numbers from 1 to 10. 10. Draw a flowchart & write a pseudocode which: a. Inputs the weight of 1000 items. b. Outputs the weight of the heaviest & the lightest item. c. Outputs the average weight of all the items. Using Trace Table Structured approach is required to find out the purpose of an algorithm (Flowchart), involves recording and studying the results from each step in the algorithm. This will require the use of test data and trace tables. A Trace Table can be used to record the results from each step in an algorithm; it is use to record the value of an item (variable) each time that it changes. This manual exercise is called a Dry Run. A trace table is set up with a column for each variable and a column for output. For Example: 19 Questions on Trace Table: 20 21 22 Instructions to make your program Programs work by automatically following one instruction after another in sequence. Sequence Statements are followed in sequence so the order of the statements in a program is important. Assignment statements rely on the variables used in the expression on the right-hand side of the statement all having been given values. Input statements often provide values for assignment statements. Output statements often use the results from assign statements. Program Code: Program Running: 23 Selection Selection is a very useful technique, allowing data items to be picked out according to given criteria. For Example, selecting the largest value or the smallest certain price, selecting everyone who is male. This done with the use of IF or CASE statements. Program Code: Program Running: 24 Repetition Most programming languages support three types of loop: • A fixed number of repetitions. • An unknown number of repetitions with at least one repetition, as the condition is tested at the end of the loop. • An unknown number of repetitions which may not be completed at all, as the condition is tested at the beginning of the loop. Program Code: Program Running: Totalling Totalling is used with repetition with the total updated every time the loop is repeated. Keeping a running total is one of the most frequently used programming techniques in m computer systems. For Example: 25 Counting Counting is used with repetition with the counter increased by 1 every time the loop is repeated. Counting items or events is another of the most frequently used programming techniques. For Example: Also, counter can be used to count down. For Example: 26 Classified Sheet 27 Chapter 1 Computer Network 1 2 28 3 29 4 5 30 6 7 31 8 9 32 Chapter 2 Flowchart and Pseudocode 1 33 2 3 34 4 5 35 6 36 7 37 8 38 9 39 10 40 11 41 12 42 13 43 44 14 45 46 Practical Notes 9 2 Skill Builder 1 You work for Hothouse Design and will develop web pages for Cansaulim Properties in Goa. Many of the people who will view the web page have very slow internet connection, so efficient markup must be used. • Create a new folder called m16_html • Locate the files in Skill Builder 14 Folder and place them in your m16_html folder. 1. Create a web page called m16cp.htm This web page must work in all browsers and will have a table structure as shown below: Each table cell is identified with a letter and all dimensions are in pixels. The letters shown in the table must not appear on your final web page. Table borders must not appear on the final web page. 2. Place in cell A the image m16logo.jpg 3. Enter in cell B the text We design, create, build, furnish, sell or rent Set this text as style h1. 4. Using the most appropriate image from m16img1.jpg to m16img8.jpg place in cell: • C the image of a plot of land for sale • D the image of a builder making a wall • G the image of a beach front café • H the image of a Portuguese style house. 47 5. Make sure appropriate text is displayed, if an image is not available. 6. In cell: • E enter the text Prime location building plots for sale • F enter the text Local construction workers • I enter the text Arossim beach front café for sale • J enter the text Portuguese colonial style house for sale Set all this text as style h2. 7. In cell K enter the text: Web Design by Hothouse Design: Page last edited by: followed by your name, Centre number and candidate number. Set this text as style h3. 8. Centre align the table in the browser. Save the web page. 9. Make the text Hothouse Design a hyperlink to send an email message to hothouse-design@cie.org.uk with a subject line Make me a website! 10. Attach the stylesheet m16ss.css to the web page. Save the web page. The stylesheet has been created but needs to be improved using the most efficient syntax. Make sure your stylesheet contains no html. 11. Open and examine the stylesheet m16ss.css in a suitable software package. Add the following to this stylesheet: Add your name, Centre number and candidate number as a comment to your stylesheet. Save this stylesheet in your m16_html folder. EVIDENCE 1 Take a screenshot showing the content of your stylesheet. Place this in your Evidence Document. EVIDENCE 2 Display the web page in your browser. Take screenshot evidence of the web page in the browser and place this in your Evidence Document. EVIDENCE 3 Take a copy of the HTML source and place this in your Evidence Document. 48 Skill Builder 2 You are going to help develop a website for the Goa Elephant Sanctuary to raise awareness of the project. Viewers of the website may have slow internet connection, so efficient markup must be used. • Create a new folder called 1632_html • Locate the files in Skill Builder 16 Folder and place them in your 1632_html folder. 1. Create a web page called 1632ges.htm This web page must work in all browsers and will have a table structure as shown below. Each table cell is identified with a letter and all dimensions are in pixels: Table borders and the letters shown in the table must not appear on your final web page. 2. Place in cell A the image 1632logo.jpg Resize this image to 730 pixels wide, maintaining its aspect ratio. 3. Using the most appropriate image from 1632img1.jpg to 1632img8.jpg, place in cell: • B the image of an elephant in a river • C the image of an elephant ride • D the image of a stream in the jungle • E the image of a garden. 4. Make sure that appropriate text is displayed for each image, if it is not available. 49 5. In cell: • F enter the text Elephant bath time • G enter the text Elephant rides • H enter the text Trek up a jungle stream • I enter the text Chill out in our tranquil gardens Set all this text as style h1. 6. Place in cell J the text Updated by: followed by your name, Centre number and candidate number. Set this text as style h2. 7. Centre align the table in the browser. Save the web page. 8. Create a new cascading stylesheet to be used with the website. All colour codes must be in hexadecimal. Make sure your stylesheet contains no html. The specifications for this stylesheet are: Save this stylesheet in your 1632_html folder. Use the file name styl followed by your candidate number. For example, if your candidate number is 9999 then you will call the file styl9999.css EVIDENCE 1 Take a screenshot showing the content of your stylesheet. Place this in your Evidence Document. Make sure the file name is clearly visible. 9. Attach the stylesheet saved in step 8 to the web page saved in step 7. Save the web page. EVIDENCE 2 Display the web page in your browser. Take screenshot evidence of the web page in the browser and place this in your Evidence Document. EVIDENCE 3 Take a copy of the HTML source and place this in your Evidence Document. 50 Skill Builder 3 You work for Hothouse Design and have been asked by the Goan Tourist Board to help develop web pages to advertise tourism in Goa, India. The home page and three other pages have been started. • Create a new folder called 163_html • Locate the files in Skill Builder 17 Folder and place them in your 163_html folder. 1. Open and examine all the supplied web pages. 2. Using a suitable software package, open the web page nov163gtb.htm Replace the text A Candidate, ZZ999, 9999 with your name, Centre number and candidate number. Replace the text Image A with the image 163beach.jpg 3. Replace the text Image B with the image 163logo.jpg Resize this image to 1000 pixels high by 380 pixels wide. Make sure that appropriate text is displayed if this image is not available. 4. Using the most appropriate image from 163img1.jpg to 163img8.jpg, replace the text: • Image C with the image of a chef preparing food • Image D with the image of an elephant ride • Image E with the image of a river boat. 5. Make the text Click here a hyperlink to return to the top of the page. 6. Make the text Hothouse Design a hyperlink to send an email message to: hothouse-design@cie.org.uk with a subject line Web design enquiry 7. Set the name for a default target window to _self 8. Make the image of the elephant ride a hyperlink to the web page for the Goa Elephant Sanctuary to open in a new window called _blank Save the web page. EVIDENCE 1 Display the web page in your browser. Take screenshot evidence of the web page in the browser and place this in your Evidence Document. 51 A trainee has attempted to create a stylesheet to organise tables and lists. This contains a number of errors and omissions. Make sure your stylesheet contains no html. All colour codes are in hexadecimal. 9. Open and edit the stylesheet nov163ss.css The specifications for this stylesheet are: Correct and complete the stylesheet in the most efficient way. Add your name, Centre number and candidate number as a comment to your stylesheet. Save this stylesheet in your 163_html folder. EVIDENCE 2 Take a screenshot showing the content of your stylesheet. Place this in your Evidence Document. 10. Open the web page saved in step 8 in your editing software. Attach the stylesheet saved in step 10 after the in-line styles. Save the web page. EVIDENCE 3 Display the web page in your browser. Take screenshot evidence of the web page in the browser and place this in your Evidence Document. EVIDENCE 4 Take a copy of the HTML source and place this in your Evidence Document. 52
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )