Insertion sort: iterates through a list and swaps the left value for right if left > right. Worst case occurs when items are in reverse
order and is not good for big arrays Worst and avg: n^2 Best: n
Bubble sort: compare first to second if need to swap sw
decimal 999 to binary, show 10 digits.
binary 0101010110 to decimal.
decimal 999 to hexidecimal.
hexidecimal A9 to decimal.
Assume that str1="this is an example"; str2="okay "; st
What does a constructor specify?
A constructor specifies how to create new objects/instances of the class.
Describe the difference between public and private visibility.
Public states that the class is available for use by clients in other classes i
1. Explain in your own words the process of stepwise refinement.
Stepwise refinement is a strategic way of breaking down large programs into smaller subtasks
that are easier and more manageable to handle, from the bigger picture to the finer details.
1. Write a boolean expression that is true when the integer num is
(num % 2) = 0)
2. Write a for loop with an if statement nested inside to print this
1 - odd
2 - even
3 - odd
4 - even
for (int i = 1; i <= 5; i+)
print(i + );
What is the purpose of each of the three expressions that appear in the contol
line of a for statement?
for (init; test; step)
init is a declaration that initializes the loop index variable.
test is a conditional test used to determine whether the loop
What is the difference between = and = in Java?
= is an operator used to specify an assignment with two operands: one on the
left and one on the right.
= is used to declare which values are equal to which.
What does it mean to say that two contro
Which of these are valid identifiers (i.e. class names, program names, variable
total# (no special characters)
class (must not be a reserved word)
dog_cost ; is the answer because it obeys all rules to be considered a
1. What is the process that checks syntax rules and translates a java program into an
The process that checks syntax rules and translates a java program into an
intermediate language is the compilation p
Introduction to Software Design
Test 1 on Wednesday!
Lab 6 this week
Program 3 posted, due after Spring Break
Career Fairs this week
Career Fair Time!
Look sharp. First impressions do matter
Make sure you print off e
Introduction to Software Design
Homework #1 - Due Thur @ 11:55pm
First Labs - Thur/Fri this week
Course Add Closes - Mon, Jan 25
Force Add Requests
Go to our lecture - Irwin MW (12:
Jeroo CS notes:
To make a sub class, you input Public Class (newClassName) extends
(existing class name).
Example: Public Class Harvester extendes Jeroo.
To make Jeroo do what we want, we add a myProgram, which is
public void myProgram()
CS notes: First Class
Class a definition of an object (LightBot)
Instantiation process to create a new object New lightbot();
Declaration process to crate a new name/variable. (lightbot andy)
Object in this case, andy is an instance/object of the user cla
Examples: Random Variables and Probability Distributions
RANDOM VARIABLES and PROBABILITY DISTRIBUTIONS
Example: Give the sample space giving a detailed description of each
possible outcome when three electronic components are tested, where
N - denotes no
Hashing and B-trees are efficient implementations for large disk-based database applications
Though, Hashing is more efficient for exact-match compared to B-tree, but, B-tree can perform range queries efficiently compared to hashing
Data Types have b
CMP 641 Operating Systems
Spring 2016 (Quiz 1 Reviews)
Quiz 1 consists of 10 multiple choice questions each of which carries 10 point. You are required
to answer all questions.
Please review and understand the following key areas as you prepare for your q