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

Essential Data Structure Operations and Java Implementations

Computer science3.95 KB

Inserting the First Element into a Tree Structure

Method to add the first element (root) to a Tree Structure:

public void insertFirstNode(Object item)
{
    // If the tree is empty, the new node becomes the root of the tree
    if (theRoot == null)
    {
        Node theNewNode = new Node(item);
        theRoot = theNewNode;
    }
}

Deleting an Element from a Linked List

Method to remove an element at a specific index in a Linked List:

public void remove(int index) {
    // Special case: removing at the head of the list
    if (index == 1) {
        head = head.getNext();
    } else {
        // Find the previous and current node
        setCurrent(index);
        prev.setNext(curr.getNext());
    }
    size = size - 1;
}

Steps for Inserting an Element

...
Continue reading "Essential Data Structure Operations and Java Implementations" »

Database Design and Systems Development Principles

Computer science3.83 KB

Database Modeling and Relationships

  • Multi-valued: Derived
  • Cardinality: 1(0,3), M(1,1)
  • Optionality: ()
  • Weak Entities: [[]]
  • Formula: TS = PS - DC + OC

Data Integrity Constraints

  • Entity Integrity: Different Primary Key (PK) values.
  • Cascading Referential Integrity: Foreign Keys (FK) must exist in the referral table.
  • Domain Integrity: Predefined data types, maximum and minimum values.

Database Normalization

  • 1st Normal Form: Multi-valued attributes removed.
  • 2nd Normal Form: Partial dependency (PD) removed.
  • 3rd Normal Form: Transitive dependency (TD) removed.

Objectives: Eliminate redundancy, prevent data inconsistencies (anomalies), and ensure consistent database design.

Database Anomalies

  • Addition/Insertion anomaly
  • Deletion anomaly
  • Update anomaly

Logic and Decomposition

  • Lossless
...
Continue reading "Database Design and Systems Development Principles" »

Java JDBC Oracle Database Connection Class Implementation

Computer science2.62 KB

Implementación de la Clase Conecta

A continuación, se presenta la estructura de la clase Conecta, diseñada para gestionar la conexión a una base de datos Oracle mediante JDBC.

Código Fuente

package cl.duoc.tap.solemne3.datos;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Conecta {
    private String ip;
    private String puerto;
    private String usuario;
    private String password;
    private String baseDatos;
    private String driver;
    private Connection conn;

    public Conecta(String ip, String puerto, String usuario, String password, String baseDatos, String driver) {
        this.ip = ip;
        this.puerto = puerto;
        this.usuario = usuario;
        this.password
...
Continue reading "Java JDBC Oracle Database Connection Class Implementation" »

Wireless Network Essentials: APs, WLCs, and Core Concepts

Computer science15.83 KB

Chapter 7: Wireless LAN Fundamentals

802.11 Architecture and Operations

1. What are the main planes in a WLAN architecture?

  • A) Management
  • B) Control
  • C) Data

2. Which plane handles signaling and coordination?

  • A) Control

3. Which plane handles configuration and monitoring?

  • B) Management

4. Which mechanisms are used for channel access in 802.11?

  • A) CCA (Clear Channel Assessment)
  • D) VCS (Virtual Carrier Sense)

5. What is the shortest interframe space in 802.11?

  • C) SIFS (Short Interframe Space)

6. How many address fields are typically in an 802.11 frame?

  • D) 4

7. What type of frame is sent by an AP in response to a client's probe request?

  • A) Probe Response

8. What is used to derive the encryption keys in WEP?

  • D) The WEP passphrase

9. What type of scanning involves listening

...
Continue reading "Wireless Network Essentials: APs, WLCs, and Core Concepts" »

Working with Databases in Access: A Comprehensive Guide

Computer science2.35 KB

Topic 8: Exporting Data from Access

Exportable File Formats

  • SharePoint
  • Word files
  • Excel documents
  • Other Access databases
  • Text files

Linked Tables and Data Updates

Changes made to the original Excel data will not be reflected in the linked Access table.

Dividing a Database

An Access database can be split into two files:

  • Server File: Contains the tables.
  • Client File: Contains forms, reports, and other created objects.

Topic 9: Working with Forms in Access

Simple Forms

Access can automatically generate simple forms from active tables, displaying records in an organized layout and allowing for new data entry.

Form Tools

Form tools simplify the creation of forms by allowing you to select the desired data fields.

Split Forms

Split forms offer two views:

  • Form View
  • Datasheet
...
Continue reading "Working with Databases in Access: A Comprehensive Guide" »

Fundamentals of Integers, Primes, and Factorization

Computer science8.67 KB

Chapter 1: Fundamentals of Numbers

Numbers and Notation

We begin by talking about numbers. This may seem rather elementary, but it does set the scene and introduce a lot of notation. In addition, much of what follows is important in computing.

1.0.1 Integers: Definition and Properties

We begin by assuming you are familiar with the integers:

Ecuacion

Sometimes called the whole numbers, these are just the numbers we use for counting. To these integers we add zero (0), defined as:

Ecuacion

Once we have the integers and zero, mathematicians create negative integers by defining (-n) as the number which, when added to n, gives zero. So, n + (-n) = (-n) + n = 0. Eventually, we simplify writing n + (-n) = 0 to n - n = 0. We now have the set of positive and negative integers:...

Continue reading "Fundamentals of Integers, Primes, and Factorization" »

Digital Modulation, Network Topologies and IP Addressing

Computer science2.87 KB

Digital Modulation Techniques

FSK Modulation: Each set of bits is represented by a discrete frequency. In the simplest case, two frequencies are used: F0 and F1.

ASK Modulation: Each set of bits is represented by a discrete amplitude. Information is transmitted based on the amplitude of the carrier. If the bit is 0, it is sent as amplitude A0; if the bit is 1, it is sent as amplitude A1. In the case of ASK2, it reduces to phase modulation, as it changes the sign of the carrier (a 180-degree phase jump), which is the basis of QPSK.

PSK Modulation: Each set of bits is represented by a discrete phase of the carrier. Signaling 0 and 1 by sending the reference carrier and a 180-degree phase jump is commonly called BPSK modulation.

Voice Digitization

...
Continue reading "Digital Modulation, Network Topologies and IP Addressing" »

Distributed Database Concepts and Architecture Fundamentals

Computer science3.08 KB

First Partial: Distributed Databases

1. The Database Concept

R: A database is a set of interrelated information for a common purpose.

2. Definition of Distributed Database

R: A distributed database is a collection of multiple databases located in different locations and connected via a network.

3. Goals of Distributed Databases

R: Building distributed systems, including databases, information sharing, reliability, availability, and speed in query processing.

4. Advantage of Data Distribution

R: The advantage of distributed systems is the ability to share and access information reliably and effectively.

5. Increasing Complexity Reflection

R: This reflects in gesta (management) software development, a greater likelihood of errors, and longer processing...

Continue reading "Distributed Database Concepts and Architecture Fundamentals" »

Network Management, Domains, and Resource Sharing Configuration

Computer science3.47 KB

Network Management Fundamentals

Network management consists of deciding how to configure the network, joining teams, determining what permissions users will have, and handling all tasks related to the operation of the network.

Client/Server Network Architecture

A client/server network consists of the following components:

  • Server: Network equipment more powerful than the others, acting as the central controller. The server sets up the network and its policies.
  • Client Computers: Devices connected to the server that depend on it for resources and services.
  • Shares (Resources): Devices like printers, faxes, and other peripherals used by all network users.
  • Connection Devices: Equipment that connects all the computers composing the network (e.g., switches,
...
Continue reading "Network Management, Domains, and Resource Sharing Configuration" »

Software Fundamentals: Classification and Acquisition Methods

Computer science3.38 KB

Software: Definition and Functions

Software is the intangible component of any computer system. It consists of a collection of rules and guidelines that establish the relationship between the user and the machine.

Functions of Software

  1. To reduce manual entry of information.
  2. Provide communication media between man and machine.
  3. Encourage greater use of media and reduce the processing time of files.
  4. Provide routines that automatically perform repetitive, classified work.

Software Classification

System Software

A series of programs that facilitate man-machine communication, permitting its proper exploitation.

Application Software

Programs developed to solve specific problems. These can be classified into:

Basic or Utility Programs

These are applications whose...

Continue reading "Software Fundamentals: Classification and Acquisition Methods" »