Notes, summaries, assignments, exams, and problems for Computer science

Software Design Patterns: Enhancing Flexibility and Structure

Computer science3.73 KB

Design patterns offer proven solutions to recurring software design challenges, promoting code reusability, maintainability, and efficiency. They can be categorized into three main types:

Behavioral Design Patterns

These patterns focus on communication and interaction between objects, enhancing flexibility. Examples include:

  • Observer Pattern: Enables one-to-many dependencies, where changes in one object automatically notify dependent objects.
  • Iterator Pattern: Provides sequential access to elements within a collection without exposing its underlying structure.

Creational Design Patterns

These patterns address object creation mechanisms, ensuring suitable instantiation processes. Examples include:

  • Singleton Pattern: Restricts object creation to a single
...
Continue reading "Software Design Patterns: Enhancing Flexibility and Structure" »

Understanding Computer Security: From Worms to Encryption

Computer science1.91 KB

Understanding Computer Security

Common Threats

  • Worm: Designed to replicate itself, a worm operates as a standalone application, unlike a virus.
  • Trojan: Disguised as a legitimate program (e.g., a screensaver), a Trojan operates covertly to inflict damage.
  • Phishing: Attackers impersonate trustworthy entities to steal sensitive information, exploiting social engineering tactics.

Network and Security Concepts

  • Simple Mail Transfer Protocol (SMTP): A standard for email communication, SMTP is known for its lack of robust security.
  • Sandboxes: Software environments that isolate programs to prevent them from harming the host system, commonly used in web browsers.

Wireless Security

  • Wireless Internet (Wi-Fi): Enables wireless communication between devices, forming
...
Continue reading "Understanding Computer Security: From Worms to Encryption" »

Essential Tech Terms: A Comprehensive Glossary

Computer science4.83 KB

RAM (Random Access Memory)

Random Access Memory is one of two basic types of memory. Portions of programs are stored in RAM when the program is launched so that the program will run faster. Though a PC has a fixed amount of RAM, only portions of it will be accessed by the computer at any given time. Also called memory.

Scrolling

Scrolling allows lines displayed on the screen to be moved up or down by one line as a new line is added and an existing one is removed.

Shooter

A shooter is a game whose main focus is combat involving guns or other projectile weapons such as missiles.

Shopping Cart

A shopping cart is software that keeps track of what you buy on a site.

Software Engineer

A software engineer is a person that writes computer programs.

Speech Recognition

Speech

...
Continue reading "Essential Tech Terms: A Comprehensive Glossary" »

Understanding Computer Hardware and Software Essentials

Computer science2.9 KB

Computer Hardware

Core Components

CPU (Central Processing Unit)

The CPU controls and executes operations within the computer to process information. It consists of:

  • CU (Control Unit): Coordinates all computer activities and manages temporary data storage.
  • ALU (Arithmetic and Logic Unit): Performs basic data operations.

Memory

  • Random Access Memory (RAM): Enables reading and writing operations, allowing access to random memory locations.
  • Read Only Memory (ROM): Contains permanent instructions for computer startup, forming the BIOS (Basic Input Output System).

Input/Output Units

These units facilitate communication between the CPU, internal components, and external devices.

Buses

Buses enable efficient information exchange between computer components. Types...

Continue reading "Understanding Computer Hardware and Software Essentials" »

Low-Level Programming: Machine Language, Pep/8 Assembly, and Algorithms

Computer science3.92 KB

Computer Fundamentals and Data

A Computer is a programmable electronic device that can store, retrieve, and process data.

Data and Instructions: Instructions that manipulate data are logically the same as the data itself and can be stored in the same memory location.

Understanding Machine Language

Machine Language is a language made up of binary-coded instructions built directly into the computer's hardware and used by the processor.

Why Machine Language?

It is the fundamental language the hardware understands (no choice).

Characteristics of Machine Language

  • Every processor has its own unique set of machine instructions.
  • The relationship between the processor and the instructions it can carry out is completely integrated.
  • Each machine-language instruction
...
Continue reading "Low-Level Programming: Machine Language, Pep/8 Assembly, and Algorithms" »

Image Optimization and Exporting for Web Use

Computer science2.79 KB

Image Optimization Process

During image design and transformation, there's complete freedom. Optimization is applied at the end, before exporting the image to a web-compatible format.

Optimization involves three key steps:

  1. Selecting the best file format to manage file size.
  2. Adjusting format options and colors. Each format has specific compression controls, some limiting color palettes.
  3. Defining export options based on image use.

Common Export Formats

  • GIF (Graphics Interchange Format): Up to 256 colors, supports transparency, ideal for animations, logos, and images with transparent areas. Often used for vector graphics.
  • JPEG (Joint Photographic Experts Group): Best for photos and textured images, supports many colors, but has fewer image quality options.
...
Continue reading "Image Optimization and Exporting for Web Use" »

Project Planning and Control with Gantt Charts

Computer science2.67 KB

Gantt Chart: A Project Planning and Control Method

A Gantt chart is a graphical method of planning and control in which a project is divided into different activities, and estimates are made about how long each activity takes. This chart shows the timing relationships between events of a program and was developed by Henry L. Gantt. Gantt charts are useful for monitoring relatively small projects.

Understanding Key Concepts

  • Task: Project activities are carried out in a particular sequence.
    • Predecessor Task: A task that must start or finish before another can begin.
    • Successor Task: A task that depends on the start or finish of a preceding task.
    • Summary Tasks: These are made up of subtasks and summarize those subtasks.
  • Milestones: A task without duration
...
Continue reading "Project Planning and Control with Gantt Charts" »

Assembler Functions and Two-Phase Translation

Computer science2.83 KB

Functions of an Assembler

The fundamental task of an assembler is to translate a program in assembly language to code for machine language. In essence, the assembler must perform the following tasks:

  • Convert the code (opcode or mnemonic: e.g., LDA, STX) to the equivalent code in machine language.
  • Convert symbolic operands (tags or variables) into the addresses of the operands.
  • Build the machine language instructions in the appropriate format.
  • Convert the constants defined in the program into their true representation.
  • Write the "listing" in assembly language to machine language code.
  • Process the assembly guidelines. The guidelines are instructions or commands directed to the assembler, which it processes and executes as it encounters them in the assembly
...
Continue reading "Assembler Functions and Two-Phase Translation" »

Understanding Databases: Relational Models and Access

Computer science2.84 KB

What is a Database?

A database is a structured data support system that allows us to store and process data quickly, safely, and efficiently.

A database consists of fields, records, and files. We define:

  • Field: Each of the elements that make up a record, such as name, address, town, and telephone.
  • Record: A set of interrelated fields, such as personal data belonging to a shareholder of a video store.
  • File: Consists of the union of multiple records.

What is a Relational Database?

Using relational databases is useful when multiple records of a database are related to the same record in another database. A simple and intuitive way of structuring data is using tables, i.e., arranged in rows and columns. The relational model uses the table structure for...

Continue reading "Understanding Databases: Relational Models and Access" »

Local Area Networks (LAN) and High-Speed Networks: Fundamentals

Computer science3.01 KB

Chapter 1: Local Area Network (LAN) Fundamentals

A local area network (LAN) includes the components, both software and hardware, that enable microcomputers, PCs, and peripherals within a limited geographical area to communicate with each other. LANs also facilitate the distribution and sharing of all system resources between different units.

Key Characteristics of a Local Area Network

  • Limited geographical area
  • High transmission speed (from 1 Mbit/s to 1 Gbit/s)
  • Low error rate
  • Entire network is owned and managed by the user

These LANs can be interconnected in various ways using repeaters, bridges, gateways, routers, or switches.

Local Area Network Objectives

  • Allow secure communication at a reasonable cost
  • Be structured in levels, allowing changes by level
...
Continue reading "Local Area Networks (LAN) and High-Speed Networks: Fundamentals" »