1 / 79

CPS120 Introduction to Computer Science

CPS120 Introduction to Computer Science. Lecture 2. Types of Programming Languages. Machine language Procedure-oriented languages Object-oriented languages Event-driven languages. What Can a Program Do?. A program can only instruct a computer to: Read Input Sequence Calculate

amarante
Download Presentation

CPS120 Introduction to Computer Science

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CPS120 Introduction to Computer Science Lecture 2

  2. Types of Programming Languages • Machine language • Procedure-oriented languages • Object-oriented languages • Event-driven languages

  3. What Can a Program Do? • A program can only instruct a computer to: • Read Input • Sequence • Calculate • Store data • Compare and branch • Iterate or Loop • Write Output

  4. Fundamental Programming Concepts • Assignment of values to a variable • Iteration (Looping) • Over a set of set of statements • With respect to a logical expressions (conditions) • Delegation of sub-tasks to functions / procedures

  5. The Structure Theorem The Structure Theorem states that any algorithm can be built from three basic control structures. • One-after-another (Sequence) • Decision-making (Selection) • Making choices between 2 or more alternatives • Repetition (Iteration) • Concerned with repetitive tasks (and the termination conditions of loops)

  6. Electronic Communications CPS120 Introduction to Computer Science

  7. E-Mail • Addresses • Location of an individual mailbox on the Internet • User name, @ sign, domain – no spaces

  8. Web-based E-mail • Don’t need email client • Popular Web-based E-mail Services • www.hotmail.com • www.email.com • mail.yahoo.com

  9. By type: .com .edu .gov .mil .net .org By country Australia - .au Canada - .ca Ireland - .ie Italy - .it Japan - .jp United Kingdom - .uk Organization Other new codes have been defined

  10. Newest Additions to the Web New domain names: • .info • .biz • .name • .pro • .museum • .coop • .aero

  11. E-mail Features • Address books • Signatures • Attachment of files • Try to keep under 50Kb • Sometimes certain types of files are screened

  12. E-Mail Issues • Emoticons • :-) • Abbreviations • LOL • TTFN • Netiquette • Shouting • Flame

  13. Viruses • An e-mail virus is a program that can disrupt the normal operation of a computer • Display of unusual messages • Destroying files on the hard drive • Sending mail to people in your address book • Triggered by opening files; sometimes only in preview • Anti-Virus programs available commercially • Must be kept up-to-date

  14. Newsgroups and Chat

  15. Mail Groups • A mailing list is a discussion group that uses e-mail to communicate • A list of mailing lists is at www.liszt.com • Moderated vs. un-moderated lists • Must subscribe to participate • Two addresses • Mailing list addresses • Administrative addresses

  16. Newsgroups • A discussion group that allows people with common interests to communicate with each other • USENET (User’s Network) • All the computes that distribute newsgroup information • Messages • Individual posts • Threads • Messages and all replies

  17. Addressing • First word describes the main topic • Each additional word is separated by a dot and serves to narrow the topic

  18. Networking Aspects • Newsreader – program that lets you read and post online • Microsoft Outlook has a built-in reader • Gravity • Free Agent • News server • A computer that stores newsgroup messages

  19. alt biz comp misc rec sci Soc talk General Interest Business Computers Miscellaneous Recreation & Hobbies Science Social (culture/politics) Debate Newsgroup Categories • alt.fans.actors • biz.entrepreneurs • comp.security.misc • misc.books.technical • rec.food.recipes • sci.physics • soc.history • talk.politics.misc

  20. Newsgroup Etiquette • Lurk first • Read FAQ • Reply • Send a private reply

  21. Chatting • One of the most popular features on the Internet (but no one admits to doing it) • Text-based • Multi-media • Internet Relay Chat (IRC) channels • Need a program to participate (www.mirc.com) • Instant messaging allows you to communicate privately with others • MSN or AOL

  22. Networks CPS120 Introduction to Computer Science

  23. What Is a Network • A network is a group of connected computers that allow people to share information and equipment

  24. Types of Networks • LAN (Local Area Network) connects computers within a small geographic area like a building • WAN (Wide Area Network) connects computers across a large geographic area like a city or country (often via satellite) • Internet: World-wide network of networks

  25. Advantages to Networking • Road warriors • Eliminate “sneakernet” • Share information • Share equipment

  26. Who Runs It? • A network administrator manages the network and makes sure it runs smoothly • Often called a systems administrator or an IS manager

  27. Network Applications • Electronic mail • Groupware • Calendaring • Scheduling • Video-conferencing • Requires sound card, speakers, mike & camera

  28. Physical Networking • Hubs • A hub is a device that provides a central location where all the cables on a network come together • NICs (Network Interface Card) • An expansion card that physically connects each computer to the network • Cables • Coaxial, Unshielded Twisted Pair (UTP), Shielded Twisted Pair, Fiber-optic • Wireless

  29. How Information Is Stored • Client-Server: • Used for large networks • Files are stored on a central computer and everyone who can access the network can be given access them • Easy to create scheme to backup and protect files • Client: a computer that can access information stored on the server • Server: Central computer that stores files • NetWare, UNIX, Windows NT/2000

  30. How Information Is Stored • Peer-to-Peer: • Used for a small number of computes (e.g. 10) • Files stored on own computers; access given to them to others on the network • LANtastic, Windows-98, Windows-ME

  31. How Information Is Exchanged • Ethernet: • Most popular and least expensive solution • Each computer waits for a pause before sending information • Like polite conversation • Collisions between information often occur • Computers wait a moment, then resend • Ethernet – 10 Mbps, Fast Ethernet – 100 Mbps, Gigabit Ethernet 1000 Mbps

  32. How Information Is Exchanged • Token-ring is a type of network where a token that collects and delivers information is passed from compute to computer • Speeds of 4 or 16 Mbps • Asynchronous Transfer Mode (ATM) is a type of network that works by sending information in equal-sized pieces called cells • 25, 155, 622 or 2488 Mbps • Often networks networks

  33. Network Security • Operating System Security • Other system software • Firewall – specialized hardware or software package designed to protect a private computer network from unauthorized access • Think “Moat” • User name and password • Used for authentication • Good passwords

  34. Intranet • Small version of the Internet in a company • Uses familiar web-browsers and email packages • Allows hyper-linking • VPNs (Virtual Private Network) • End-to-end encryption • More cost efficient than private lines

  35. Internet and WWW Chapter 10

  36. Internet Fundamentals • Dates from DARPA in the 1960s • Consists of thousands of connected networks around the world • Each organization on the Internet is responsible for maintaining its own equipment • These organizations allow you to pass-through their nets • Designed to provide multiple routing to bypass disabled computers • Called cyber-space or the information superhighway

  37. Internet Offerings • Electronic mail (Most popular application) • Information • Entertainment • Discussion Groups • Chat • Programs (Shareware) • Online shopping

  38. Connecting • Computer • Software • Modem or high-speed connection • ISP (Internet Service Provider) • Access for a fee

  39. World Wide Web • Part of the Internet consisting of a huge collection of documents stored on computers around the world • Web server: computer that stores and delivers web pages • Web site: collection of web pages • URL (Uniform Resource Locator) – unique address • HTTP, Computer, Directory, Name of Page • Hyperlinks jump to different web pages

  40. Browsers • A program that lets you view and navigate information on the World Wide Web • Home Page: Web page that appears each time you start your web browser • Browser: • Internet Explorer • Netscape Navigator • Features • Bookmark • History lists

  41. Multimedia • MP3 – compressed files containing music or video • WinAmp • Streaming video – requires player • RealPlayer, QuickTime • Enhancements • Java • JavaScript • ActiveX

  42. Web Portal • Central starting point for browsing personalized by the individual • Yahoo, Excite, Go, Lycos • Info • Free services like email, shopping, chat, games, stock quotes and sports scores

  43. Create & Publish Web Pages • HyperText Mark-up Language is a computer code used to create Web pages • There are many programs available, called visual editors which can help you create Web pages without having to learn HTML • Publishing your pages – loaded to an addressable server

  44. Security CPS120 Introduction to Computer Science

  45. Aspects of Computer Security • A. Hardware • B. Files • C. Connectivity

  46. Key Areas Addressed by Security • Physical security – how do I keep my hardware and key files safe • Password security – what is a good password and how do you set one • Computer viruses – what they are and how to protect your computer • Network security -- how to protect yourself • Firewalls - what the can and can’t do and why they are important for always-on connections • Backup strategies - why and how to backup your work

  47. Physical Security

  48. All Computers • Temperature • If too high, components malfunction • Components generate heat which must be removed • Humidity • If too high: condensation and corrosion of metal parts • If too low: static electricity (very high voltage!) • Electric power • Irregularities: power spikes, dips, and brown-outs • Special care during thunderstorms! • Power failure: un-interruptible power supply (UPS)

  49. Physical Access • Access to the computer room • Logs of who goes in and out • Console security • Screen passwords, etc. • Access to the physical network • Locking laptops, protecting components on desktops, servers, etc. • Policies • Contingency planning

  50. Password Security

More Related