AP Computer Science A: Java Review & Free-Response Questions

AP COMPUTER SCIENCE 2020 CHEAT SHEET – WILLIAM KONG

1) Strings

A string is a line of text, an object in Java, defined by the String class.

String concatenation – Use the + operator to add multiple strings or numbers.

A string is an array of characters.

Methods of the String Class

  • int length() – Returns the length of the string.
  • String substring(int from, int to) – Returns a substring from the specified starting index (inclusive) to the ending index (exclusive).
  • String substring(int from) – Returns a substring
Read More

Understanding Data Units, Python, R, Excel, and SQL

Understanding Data Units

Common Data Units

Bit (b): The smallest unit of data storage, representing a binary digit (0 or 1).

Byte (B): A group of 8 bits, typically representing a single character.

Kilobyte (KB): 1,024 bytes.

Megabyte (MB): 1,024 KB.

Gigabyte (GB): 1,024 MB.

Terabyte (TB): 1,024 GB.

Petabyte (PB): 1,024 TB.

Exabyte (EB): 1,024 PB.

Zettabyte (ZB): 1,024 EB.

Yottabyte (YB): 1,024 ZB.

Python Basics

Key Concepts

  • Python is case-sensitive.
  • Indentation is crucial for code blocks.
  • The print() function outputs
Read More

Understanding Computer Networks: Communication Structures, Protocols, and Design

Communication Structures

Key Elements:

  • Naming and Name Resolution: Identifies processes with host and process IDs, utilizing DNS.
  • Routing Strategies:
    • Fixed Routing: Predefined path from source to destination.
    • Virtual Circuit: Fixed path for a single session.
    • Dynamic Routing: Path determined at the time of message sending.
  • Connection Strategies:
    • Circuit Switching: Dedicated physical link for the duration of communication (e.g., mobile phones).
    • Message Switching: Temporary link for a single message transfer
Read More

Database Normalization and Transaction Management: A Comprehensive Guide

Understanding Database Normalization

Goals of Normalization

Normalization is a crucial process in database design aimed at organizing data efficiently and minimizing redundancy. Its primary goals include:

  • Minimizing Data Redundancy: Eliminating duplicate data to save storage space and ensure consistency.
  • Ensuring Data Integrity: Maintaining data accuracy and consistency through logical organization and redundancy reduction.

Advantages of Normalization

Implementing normalization offers several benefits,

Read More

IP Routing, Datagram Routing, and Transport Layer

K- IP Routing & Transp:1-Datagram Routing:

Decision-making process on where to forward datag. Any device making such decision is called a router. Routing can be direct (host part of the LAN) or indirect (other cases). Routers form a cooperative interconnected structure. Datagrams pass from router to router until they reach a router capable of delivering directly (locally) to the destination.

Table Driven Routing:

Every router maintains a routing table with entries in the form of pairs-(N, G),

Read More

Software Development Life Cycle Models: A Comprehensive Guide

Software Development Life Cycle Models

Activity-Centered vs. Entity-Centered Views

Activity-centered models focus on the activities involved in software development, while entity-centered models emphasize the work products created during these activities.

The activity-centered view helps participants understand how work products are created, while the entity-centered view focuses on the content and structure of the work products.

IEEE 1074 Standard

The IEEE 1074 standard provides a common framework for

Read More