Computer Fundamentals and Programming Comprehensive Study Guide

Learning Outcomes and Course Introduction

  • Practice Christian values while developing computer solutions.

  • Follow and comply with ethical standards in computer and information use.

  • Develop a foundation in basic information technology concepts.

  • Explain the impact of computers on global, economic, environmental, and social contexts.

  • Apply current developments in computers to the engineering field.

  • Evaluate computer applications to simplify office tasks.

  • Describe and apply engineering techniques and problem-solving skills using computers.

  • Design and create algorithms, then translate them into workable computer programs following standards and conventions.

  • Work independently to analyze problems and discuss solutions.

  • Practice programming skills and work effectively as a team member.

  • Technical content includes Windows, word processing (MS Word), spreadsheets (MS Excel), algorithm development, and Object-Oriented Programming (OOP) using Java.

  • Java concepts include syntax, semantics, variables, data types, operators, expressions, input/output, control structures (conditional and iterative), methods, parameter passing, modularization, arrays, wrapper classes, and string processing.

Module 1: The Computer

  • Definition: A computer is an electronic device performing activities involving mathematical, logical, and graphical manipulations. It is a collection of devices functioning together as a system under the control of instructions stored in its own memory.

  • Input-Process-Output (IPO) Model:

    1. Receive data and instructions from the input device.

    2. Process data per instructions.

    3. Provide the result (output) in a desired form.

  • Data vs. Information:

    • Data: Raw facts and details such as text, observations, figures, symbols, and descriptions. Example: Responses gathered from a survey.

    • Information: Processed, organized, and structured data that provides context. Example: Survey responses compiled into a tabular form for interpretation.

  • Programs and Software:

    • Computer Program: A collection of instructions executed by a computer to perform a specific task.

    • Software: A set of instructions causing hardware to function. Using a metaphor: Hardware is the TV set, while software is the TV studio program. Without software, hardware is a "dead machine."

  • Categories of Software:

    • Operating System (OS): Manages computer resources and schedules operations. Acts as an interface (bridge) between hardware and user programs.

      • Character User Interface (CUI): Keyboard-only operation (e.g., MS-DOS, UNIX).

      • Graphical User Interface (GUI): Operated via mouse and keyboard (e.g., Windows XP, Windows 7).

    • Translators: Software that translates instructions from various languages into machine language.

    • Utility Programs: Pre-written programs for day-to-day maintenance (e.g., COPY, SORT, virus scanners).

    • Application Programs: User-written programs for specific jobs, customizable to individual needs (written in BASIC, C, dBASE, or Oracle).

    • General Purpose Packages: Developed for research/scientists.

      • Data Analysis: SPSS (Statistical Package for Social Science), MSTAT, SAS.

      • Word Processing: MS-Word, Google Docs.

      • Spreadsheet: MS-Excel, Lotus, Google Spreadsheets.

      • Graphics: Adobe Illustrator, Adobe Photoshop.

      • Databases: Oracle, MS Access.

Windows Operating System and Desktop

  • OS Functions:

    1. Processor Management: Assigns the processor to different tasks.

    2. Memory Management: Allocates main memory and storage to programs and data.

    3. Input/Output Management: Coordinates assignment of I/O devices.

    4. File Management: Facilitates changing and modifying files via editors.

    5. Priority System: Determines the execution order of jobs.

    6. Command Interpretation: Interprets instructions.

    7. Communication: Facilitates interaction between the system and the operator.

  • Desktop Components:

    • My Computer: Allows viewing attached drives (local hard disks, CD/DVD, USB, network shared drives) and files.

    • My Documents: A "catch-all" for personal files, music, and pictures (sometimes identified by user name).

    • Recycle Bin: Temporary storage for deleted files until emptied.

    • Internet Explorer: Integrated web browser.

  • Icons: Graphic images representing files, programs, web pages, or commands.

    • Folder Icons: Store files and other folders.

    • File Icons: Collections of data identified by a filename, a period, and a file extension (e.g., .docx). Size ranges from bytes to gigabytes.

    • Shortcut Icons: Links to programs, identified by a small arrow in the bottom corner of the icon.

  • Icon Operations:

    • Arrange: Right-click desktop > Sort by > Select option.

    • View/Hide: Right-click > View > Toggle Auto Arrange.

    • Resize: Right-click > View > Select size.

Windows Interface and Operations

  • Start Menu Activities: Starting programs, opening folders, searching for items, adjusting settings, getting help, and power options.

  • Power Options:

    • Shut Down: Turns off the computer.

    • Switch User: Allows another person to log on without closing current programs.

    • Log Off: Closes programs but keeps the computer on.

    • Lock: Secures the PC, requiring a password to return.

    • Restart (Warm/Soft Boot): Saves info, turns off briefly, and reboots.

    • Sleep: Low-power state for quick resumption.

  • Parts of a Window:

    1. Title Bar: Displays document/program name.

    2. Minimize, Maximize, Close Buttons: Hides, enlarges, or exits the window.

    3. Menu Bar: Provides choice items.

    4. Scroll Bar: Moves contents into view.

    5. Borders and Corners: Used to drag and resize windows.

  • Switcher Shortcuts: Use Alt+Tab to switch between open windows.

  • Folder/Library Window Parts:

    • Navigation Pane: Accesses libraries, folders, and Favorites.

    • Back/Forward Buttons: Navigates previously opened folders.

    • Address Bar: Shows current path or allows navigation.

    • Toolbar: Context-relevant buttons for common tasks.

    • Column Headings: Available in Details view; used for sorting and filtering.

    • File List: Displays contents.

    • Search Box: Filters files as the user types.

    • Details Pane: Displays file properties (author, date, tags).

  • Dialog Boxes: Special windows for questions/options; cannot be maximized or minimized but can be moved.

Working with Files and Folders

  • Selection:

    • Single: Click once.

    • Consecutive Group: Click first item, hold Shift, click last item.

    • Non-consecutive: Hold Ctrl and click individual items.

    • Adjoining (Mouse): Drag pointer around items.

    • All: Organize > Select all (Shortcut: Ctrl+A).

  • Rename: Right-click > Rename OR press F2.

  • Copying: Right-click > Copy (Ctrl+C), then Right-click > Paste (Ctrl+V). Original remains.

  • Moving (Cutting): Right-click > Cut (Ctrl+X), then Right-click > Paste (Ctrl+V). Original is removed from the old location.

  • Deleting: Right-click > Delete OR press Del. Items from the hard disk go to the Recycle Bin. Items from USB/network might be permanently deleted immediately.

  • Permanent Deletion: Shift+Delete bypasses the Recycle Bin. Emptying the Recycle Bin removes files permanently.

Module 2: The Word Processing Program (MS Word)

  • Interface:

    • Title Bar: Shows the document name.

    • File Tab: Replaces the old Office Button; used for file-level commands.

    • Quick Access Toolbar: Customizable commands (Save, Undo, Redo).

    • Ribbon: Eight tabs (File, Home, Insert, Page Layout, References, Mailings, Review, View) divided into logical groups.

    • Status Bar: Shows page count, section, zoom slider, etc.

  • Advanced Features:

    • Table of Contents (TOC): Requires Heading Styles (Heading 1, 2, 3). Insert via References tab > Table of Contents.

    • Bibliography: Uses built-in styles (APA, MLA). Add sources via References > Insert Citation > Add new source. Insert via Bibliography button.

APA Formatting in MS Word

  • General Rules:

    • Margins: 1 inch all around.

    • Font: Times New Roman, 12-point size.

    • Alignment: Left-aligned (not justified).

    • Spacing: Double-spaced (2.02.0).

  • Title Page: Includes Title, Name, Institution, Page Header, and Running Head.

  • Running Head: Abbreviated version of the title (max 50 characters, ALL CAPS) on the first line.

  • Page Number: Upper right corner.

  • Page Breaks: Used to start new sections (Title, Abstract, Body, References, Appendix).

  • Abstract: Self-contained summary, max 120 words. No indentation for the first line.

  • Headings:

    • First Level: Centered, uppercase and lowercase.

    • Second Level: Flush left, italicized, uppercase and lowercase.

  • Citations:

    • Formal structure: Smith and Jones (20042004) found…

    • Parenthetical: …research supports results (Brown & Greene, 20062006; Hamilton, 20082008).

    • No author: Use first few words of title: ("Einstein Online," n.d.).

    • Direct Quotations: Always include author, year, and page number (e.g., p. 121121 or para. 44).

    • Short Quotes (<40 words): Use double quotes within the sentence.

    • Long Quotes (>40 words): Block of text, double-spaced, indented 0.50.5 inches from the left, no quotation marks.

  • References Page: Entries organized by first author's last names. Use hanging indents. If 7+7+ authors, list first 66 then use "et al."

Mail Merge Features

  • Components:

    1. Form Document: Contains the main message and placeholders/merge fields (denoted by << >>).

    2. Data File (List): Stores individual data (names, addresses) in Word, Excel, or Access.

  • Steps for Mail Merge:

    1. Write form document.

    2. Mailings > Start Mail Merge > Letters.

    3. Select Recipients > Type a New List.

    4. Customize columns (Add/Delete fields).

    5. Enter record data.

    6. Insert Merge Field where placeholders belong.

    7. Preview Results > Finish & Merge.

Module 3: The Spreadsheet Program (MS Excel)

  • Interface Structure:

    • Application Window: Contains the Ribbon, Formula Bar, and Name Box.

    • Workbook Window: Contains the actual worksheets.

  • Worksheet Constraints: Max of 1,048,5761,048,576 rows and 16,38416,384 columns.

  • Basic Elements:

    • Cell: Intersection of a row (numbers) and column (letters). Address example: C5C5.

    • Cell Range: A group of cells referred to by the first and last cell separated by a colon (e.g., A1:B8A1:B8).

    • Fill Handle: A small square in the bottom-right of a cell used to copy content or continue a series (Monday, Tuesday; 1,2,31, 2, 3).

  • Formulas and Math:

    • Must start with an equal sign (==).

    • Operators: Addition (++), Subtraction (−-), Multiplication (∗*), Division (//), Exponents (^).

    • Order of Operations: Parentheses > Exponents > Multiplication/Division > Addition/Subtraction.

  • Cell References:

    • Relative: Changes based on position when copied (e.g., =A1+B1=A1+B1 becomes =A2+B2=A2+B2).

    • Absolute: Does not change. Uses dollar signs (e.g., $A$2\$A\$2 stays constant; $A2\$A2 keeps column constant; A$2A\$2 keeps row constant).

    • Shortcut: Use F4 to toggle reference types.

Common Excel Functions

  • Syntax: =FUNCTION(argument1,argument2,...)= \text{FUNCTION}(\text{argument1}, \text{argument2}, ...)

  • Basic Functions:

    • SUM: Adds everything in the range.

    • AVERAGE: Returns the arithmetic mean.

    • MIN / MAX: Returns smallest/largest number in a set.

    • COUNT: Counts cells containing numbers.

    • ROUND(number, num_digits): Rounds to specified decimal places.

  • Conditional Functions:

    • COUNTIF(range, criteria): Counts cells meeting a condition (e.g., >32>32, "apples").

    • SUMIF(range, criteria, [sum_range]): Sums cells meeting a condition.

    • IF(logical_test, value_if_true, value_if_false): Logical branching.

  • Text Functions:

    • LEFT / RIGHT: Extracts characters from either side.

    • PROPER: Capitalizes each word.

    • TRIM: Removes extra spaces.

    • UPPER: Converts to all caps.

    • CONCATENATE: Joins text from multiple cells.

Data Management and Charts

  • Sorting: Reorganizing data alphabetically or numerically. "Sort Sheet" affects all data; "Sort Range" affects a specific selection.

  • Filtering: Narrowing down data via drop-down arrows in header cells.

  • Chart Types:

    • Column: Vertical bars for comparisons.

    • Line: Shows trends over time.

    • Pie: Proportions of a whole.

    • Bar: Horizontal bars.

    • Area: Filled-in line charts.

    • Surface: 3D landscape for large data sets.

  • Chart Elements: Titles, legends, and data labels can be added via the Design tab.

Module 4: Java Fundamentals

  • Programming Language: A standardized communication technique to specify instructions, data storage, and actions for a computer. Examples: Java, Python, C++, COBOL, FORTRAN.

  • History of Java: Developed in the early 1990s1990\text{s} by James Gosling at Sun Microsystems (originally named "Oak"). Launched in 19951995.

  • Design Goals: Simple, Secure, Distributed, Object-oriented, Robust, Portable ("Write once, run anywhere"), Interpreted (Bytecodes), Multithreaded, High-performance.

  • Java Platform Components:

    • Java Virtual Machine (JVM): Interprets bytecodes into machine language of the underlying hardware.

    • Compiler (javac): Transforms source code (.java) into bytecodes (.class).

    • Interpreter (java): Executes the bytecode.

  • Classes and Main Method: All Java programs are made of classes. To be executable, a class must be public and contain a public static void main(String[] args) method.

  • Comments:

    • Single line: // comment

    • Multi-line: /* comment */

  • Identifiers: Tokens representing names (variables, classes, etc.).

    • Rules: Cannot be keyword; must start with letter, _, or $; no whitespace; max 65,53565,535 characters.

    • Standards: Variable/methods start with lowercase (camelCase); Classes start with uppercase (PascalCase); Constants use all caps with underscores.

Java Data Types and Variables

  • Primitive Data Types:

    • Integer types: byte (11 byte, −128-128 to 127127), short (22 bytes), int (44 bytes,  ±2 billion\text{~} ±2 \text{ billion}), long (88 bytes).

    • Floating point: float (44 bytes), double (88 bytes).

    • Boolean: boolean (values: true, false).

    • Character: char (22 bytes, uses Unicode character set).

  • Strings: String is an object/class, not a primitive. Literal values use double quotes: "text".

  • Separators: Parentheses ( ), braces { }, brackets [ ], semicolon ;, comma ,, period ..

  • Constants: Declared using the final keyword. Value cannot change after initialization.

  • Output Methods:

    • System.out.println(): Prints and moves to next line.

    • System.out.print(): Prints on the same line.

  • Escape Sequences:

    • \t: Tab

    • \n: Newline

    • \": Double quote

    • \\: Backslash

    • \u00b0: Unicode degree symbol (°°).

Module 5: Java Operators & Program Development

  • Arithmetic Operators: Addition (+), Subtraction (-), Multiplication (*), Division (/), Modulus (% - Remainder).

    • Negative modulus: Result takes the sign of the dividend (e.g., -34 \text{ % } 5 = -4).

  • Unary Operators: Increment (++) adds 11; Decrement (--) subtracts 11.

  • Relational Operators: >, >=, <, <=, == (equal to), != (not equal to). Returns boolean.

  • Logical Operators:

    • && (AND): True if all are true.

    • || (OR): True if at least one is true.

    • ! (NOT): Reverses the value.

  • Operator Precedence Hierarchy:

    1. () [] (Parentheses/Array)

    2. ++ -- + - ! (Unary)

    3. * / % (Multiplicative)

    4. + - (Additive)

    5. << >> (Bitwise Shift)

    6. < <= > >= instanceof (Relational)

    7. == != (Equality)

    8. & ^ | (Bitwise AND/XOR/OR)

    9. && || (Logical AND/OR)

    10. ?: (Ternary)

    11. = += -= *= /= %= (Assignment)

  • Program Development Life Cycle:

    1. Problem Definition: Defining I/O requirements.

    2. Problem Analysis: Formulation and sub-problem breakdown.

    3. Algorithm Design: Step-by-step specification (Human language or Flowchart).

    4. Coding and Debugging: Writing source code and fixing errors (bugs).

  • Errors:

    • Compile-Time: Syntax errors, missing semicolons. Prevents execution.

    • Runtime: Logic errors, infinite loops. Occurs while the program is running.

Flowcharting Symbols

  • Terminal (Oval): Represents Start/End.

  • Process (Rectangle): Represents a change in value or location of info.

  • Input/Output (Parallelogram): Making data available or displaying results.

  • Decision (Diamond): Represents alternative paths to follow.

  • Flowline (Arrow): Indicates the sequence of operations.

  • Connector (Circle): Entry/exit to another part of the chart.

Module 6 & 7: Input and Selection Structures

  • User Input: The Scanner class from java.util.Scanner package is preferred.

    • Setup: Scanner kbd = new Scanner(System.in);

    • Methods: nextInt(), nextDouble(), next(), nextLine().

  • Math Class Functions:

    • Math.PI: Returns value of 227\frac{22}{7}.

    • Math.pow(a, b): Returns aba^b.

    • Math.sqrt(a): Returns a\sqrt{a}.

  • Selection Statements:     1. If Statement:java if (condition) { statements; } else { statements; } &nbsp;&nbsp;&nbsp;&nbsp;     2. Nested Ifs: An if statement within another if/else.     3. If-Else-If Ladder: Sequence of nested ifs executed top-down until a condition is true.     4. Switch Statement: Dispatch execution to different parts based on the value of a byte, short, int, or char expression.

    • Key term: break terminates the case sequence. Without break, execution "falls through" to the next case.

    • default: sequence executes if no case matches.

Module 8: Iteration Control Structures (Loops)

  • For Loop: Used when the number of iterations is fixed.

    • Structure: for(initialization; condition; iteration) { body }

  • While Loop: Used when the number of iterations is not fixed; checks condition before executing body.

    • Structure: while(condition) { body }

  • Do-While Loop: Executes body at least once, then checks condition at the bottom.

    • Structure: do { body } while (condition);

  • Infinite Loops:

    • For: for(;;){}

    • While: while(true){}

    • Do-While: do{}while(true);

Module 9: Arrays

  • Definition: A collection of objects of the same data type with a fixed number of values.

  • One-Dimensional Array:

    • Declaration: int month_days[];

    • Allocation: month_days = new int[12]; (Initialized to zero).

    • Indexing: Starts at 00. Access element 44 via month_days[3].

    • Manual Initialization: int days[] = {31, 28, 31, 30};

  • Multidimensional Array: An "array of arrays."

    • Declaration: int twoD[][] = new int[4][5]; (Conceptualizes as rows and columns).

Module 10: Java Methods

  • Structure: modifier returnType name(Parameter List) { body }

  • Components:

    • Modifier: (Optional) Defines access type (e.g., public static).

    • Return Type: The type of value returned; void if there is no return value.

    • Method Signature: The combination of name and parameter list.

  • Return Statement: Transfers control back to the caller.

  • Passing Parameters: Java passes parameters by value (the value is copied; original argument remains unchanged).

  • Method Overloading: Having multiple methods with the same name but different parameter lists (type, order, or number).

Module 11: Wrapper Classes and Strings

  • Wrapper Classes: Objects that correspond to primitive types (e.g., Integer for int, Double for double, Character for char, Boolean for boolean). Necessary for Collection objects like ArrayList.

  • Autoboxing: Automatic conversion from primitive to wrapper object.

  • Unboxing: Automatic conversion from wrapper object to primitive.

  • Wrapper Methods: intValue(), doubleValue(), toString().

  • String Class Methods:

    • toUpperCase() / toLowerCase(): Converts casing.

    • trim(): Removes leading/trailing spaces.

    • length(): Returns number of characters.

    • concat(): Joins two strings.

    • equals(): Compares content (returns boolean).

    • equalsIgnoreCase(): Compares content ignoring case.

    • compareTo(): Compares lexicographically based on Unicode values (00 if equal, positive if first is greater, negative if second is greater).

    • indexOf(substring): Returns index of first occurrence or −1-1 if not found.