Do Now: Answer the following question:
What system is the computer based on?
Main Idea: WorkingwithBinaryNumbers
What is a Binary Number?
Recall your standard base10 number: 512
How do we convert a number in base 2 to base 10?
History of Computers
Welcome to Computer Science! You are about to enter into the fabulous world of computer programming
but before you start, we must look at how far we have already come. With two other classmates you are to
Each group will be assigned one of the following four algorithms. Your task is to create Phase 1 for
your given algorithm. Place each step on a separate piece of paper with a cover sheet that
contains: assigned algorithm n
When an End Sub statement is reached in a Sub procedure, execution jumps to
the statement before the call statement which invoked the Sub procedure.
the statement after the call statement which invoked the Sub procedure.
the beginning o
Getting used to writing classes:
1. Write a class interface for the following programs. Your interface should include all relevant fields,
default and overloaded constructors(including the bodies of each), and all necessary met
Create a Fraction class to perform the four basic mathematical operations (add, subtract, multiply and
divide). Make sure that all methods, fields and constructors are made public and or private where
appropriate. Create a
COMPLEX NUMBER CLASS
Create a Complex Number class to perform the four basic mathematical operations (add, subtract,
multiply and divide). Make sure that all methods, fields and constructors are made public and or private
Primitives data types tested on the AP:
boolean, int, double
Expressions that contain more than one
operator are evaluated in the following
*, /, %
char charAt(int index)
Returns the char
value at the specified index.
int compareTo(String anotherString)
Compares two strings lexicographically.
int compareToIgnoreCase(String str)
Compares two strings lexicographically, ignoring c
Part II- AP
Directions: Read the following practice AP questionfill out Part A and B on this sheet, then ask Mr. Colucci
for the answer key. Check over what you have written compared to what the AP board requiresbe critical of
your work. Y
Scanner for Noobs! By Eric Green
Updated to include reading from a console Java window!
Dedicated to Melissa Mclees.
First off you have know something about java. If you dont then dont even bother reading this!
For reference the api can be obtained at goo
Part 1 Answers:
Do You Know?
1. No. A bug will only move to the location in front of it if the cell exists and is empty or if there is a flower in
2. A bug attempts to move forward.
3. When a bug cannot move, it turns 45 degrees to the rig
Do You Know?
1. What is the role of the instance variable sideLength?
The sideLength instance variable defines the number of steps a BoxBug moves on each side of its
2. What is the role of the instance variable steps?
The steps instance
Do you Know? Set 3 (page 19)
Name: _ Period: _
The API for the Location class is in Appendix B.
Assume the following statements when answering the following questions.
Location loc1 = new Location(4, 3);
Location loc2 = new Location(3, 4);
1. How would yo
Fibonacci GridWorld Project
Robert Glen Martin
School for the Talented and Gifted, Dallas, TX
This is the assignment for Fibonacci, a GridWorld programming project. You have a JCreator
starter project contained in the folder named Fibonacci S
Do you Know? Set 7 (page 30)
Name: _ Period: _
The source code for the Critter class is in Appendix C.
1. What methods are implemented in Critter?
2. What are the five basic actions common to all critters when they act?
3. Should subclasse