CS 110 - Midterm Study Notes - Part 1

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What is a selection?

(aka Branch). A statement is used to determine which of two different statements to execute depending on certain conditions

What is the Java Programming language?

-Achieves portability by using both a compiler and an interpreter -First, the java compiler translates the Java program into an intermediate Byte-code (which is like a machine language) -then, an interpreter program called the Java Virtual Machine translates a single instruction

What is a high level language? How are they standardized?

-Can be used across several types of computers -User writes program similar to a natural language (like English) -C++ is an example -They are standardized by ISO/ANSI to provide an official description of the language

What is a machine language?

-Runs only on a specific type of computer. -Is made up of binary-coded instructions (strings of 0s and 1s) -Is the language that can be directly used by the computer

How many bits in a byte? in a KB? in a MB?

1 byte= 8 bits 1 KB = 1024 bytes 1 MB = 1024 x 1024 = 1,048, 576 bytes

What are the three C++ program stages?

1-Source - written in C++ (myprog.cpp) via compiler: 2-Object - written in machine language (myprog.obj) via linker: 3-Executable-written in machine language (myprog.exe)

What are the steps to problem solving?

1. Analyze (what do we want to do?) 2. Develop (how do we do it?) 3. Verify (does it work?)

What type of information is used in a program?

1. Input data (from outside) 2. Formula Constants (used inside) 3. Computed Value (produced by program) 4. Output Results (written to a file or screen)

What are the life cycle phases in programming?

1. Problem-Solving 2. Implementation 3. Maintenance

RECAP THE PROGRAMMING LIFE CYCLE!!

1. Problem-Solving Phase -Analysis and Specification -General solution (develop algorithm) -Verify 2. Implementation Phase -Concrete Solution (Program) -Test 3. Maintenance Phase -Use -Maintain

Convert 28 to binary!

28 = 11100

Represent 3 and 5 binary as a sum of powers of 2!

3 = 2 +1 = 11 5 = 4 + 1 = 101

Represent 328 as a power of 10!

328 = 300 + 20 + 8

What is a programming language?

A programming language is a language with strict grammar rules, symbols, and special words used to construct a computer program.

What is a sequence?

A series of statements that execute one after another.

What is an algorithm?

A step-by-step procedure for solving a problem. -finite amount of data -in a finite amount of time

What is a memory unit?

An ordered sequence of storage cells, each capable of holding a piece of information. Each cell has its own unique address. the information held can be input data, computed values, or your program instructions.

What is the difference between binary and decimal?

Binary = (base 2) numbers use 2 digits only. 1s and 0s. Decimal = (base 10) numbers use 10 digits. 0 through 9 inclusive!

What are the two components of a CPU?

Central Processing Unit has two components to execute program instructions: 1-Arithmetic/Logic Unit: performs arithmetic operations, and makes logical comparisons 2-Control Unit: controls the order in which your program instructions are executed

What is a subprogram?

It is a smaller part of another program; a collection of subprograms solves the original problem

What is a: compiler?

It translates your program into machine language.

What is a looping statement?

Repetition - statement is used to repeat statements while certain conditions are met

What is testing and debugging?

Running your program to see if it works. Finding out what is wrong is called debugging

Flowcharts?

Study them.

What is computer programming?

The process of planning a sequence of steps (instructions) for a computer to follow.

What are peripherals? What are the three types?

They are devices attached to a computer... Input Devices: include keyboard and mouse Output Devices: include printers, video display, LCD screens Auxiliary Storage Devices: include disk drives, scanners, CD-ROM and DVD-ROM, modems, sound cards, speakers, and digital cameras.

What is "coding"?

Translating an algorithm into a programming language

How is memory organized on the fundamental level?

Two circuit states correspond to 0 and 1 (binary)

What is maintenance?

Using and modifying a program to keep up with changing requirements and correct errors. This starts when the program is first put into use. Sometimes rewriting the whole thing is necessary.

What is a bit?

short for: bi(nary) digi(t) and it refers to a single 0 or 1.

What is: code?

the commands for a computer

What is: documentation?

your written comments (in C++: //comments here (appear green usually)


Kaugnay na mga set ng pag-aaral

Identify the survivorship curve described in each of the following

View Set

Introduction To Activated Sludge Study Guide

View Set

AWS Overview: Intro to Cloud Computing & 6 Advantages of Cloud Computing

View Set

Ch 6-(Test 3)-Fair Credit Reporting Act (FCRA)

View Set