CS4A Study Guide Final

Topics Covered CS4A 10th Edition

Week / Chap / Description/Title
1 / 1 / Intro to Computers – make sure you know basics
1 / 2 / Elementary Programming
1 / 3 / Selections
2 / 4 / Mathematical Functions and Strings – know basics for java.lang.Integer, java.lang.String
2 / 5 / Loops – material builds on itself but by now with CS1B under your belt and this class the basics (loops, if, switch, ternary conditional operator should be 2nd nature)
3 / 6 / Methods
3 / 7 / Single Dimensional Arrays
4 / 23 / Sorting (be familiar with basic sorting java.util.Arrays.sort, you should be able to write a selection sort),
5 / 8 / Multidimensional Arrays determine locations and sizes of multi—d arrays
6 / 9 / Object and Classes – make sure you comprehend OOP, Dynamic Binding, Polymorphism and inheritance.
7 / 10 / Object Oriented Thinking
8 / 11 / Inheritance and Polymorphism
9 / 12 / Exception Handling, try catch finally block, RunTimeExceptions and RunTime Errors are unchecked; java.lang.throwable methods
Text I/O, Streams, Scanner, PrintWriter, File class
11 / 18 / Recursion; fib, factorial,
Chapters 13,19 and 10 will not be on final/Fall1016
13 / Abstract Classes and Interfaces, data access modifier private, protected, friendly, public;
Comparable, Clonable, Serializable interface
19 / Generic Basics, java.lang.ArrayList,
T extends Number, cannot do new E[], new E(),
jUnit Testing OOP Design, be familiar with Complex java jUnit tests
20 / List, Stacks, and Queque will


Some Basic questions.

What does JVM stand for?

What is a unicode?

What are seven primitive types of a JVM?

What is a constructor?

What is the difference between method overloading and method override?

What is the eve class of all Java Classes?

(not for Fall/2015) Be familiar with jUnit testing and the Complex assignment, what does Assert do, what are java An

Which package is ArrayList located?

Which Vector methods do you use to add elements to a Vector?

What is required in order to insert vector elements at a specific location?

What is the difference between a dynamic and static data structure?

How do you delete unused or dangling pointers in Java?

Which interface does a class need to implement and which Class is used to readObject and writeObject?

What are the two popular classes for Text based Java File I/O

Which Java File I/O function do you usually need inside of a try block?

What is a static property?

How do you create a constant variable in Java?

What is inheritance ?

Given two classes one is Vehicle properties – int wheels, int passengers; Automobile properties float engine; Write a class definition for vehicle including a constructor, that sets both properties. Write a class definition for automobile, it will inherit vehicle and have one constructor to set the engine size, number of wheels and passengers.


how do you create an exception? What are the two constructor and who do you extend?

What is the difference between throw and throws?

Create a 2D array holding 2 rows and 3 columns of data.

What is the array length property.

What is the difference between an abstract class and interface?

What are the advantages of using a binary versus text file?

What is the method String.split( )??

What is the difference between a stream and a file?


What are the four class access modifiers?

What is the difference between String, StringBuilder and StringBuffer?

What is a stack?

What are the key points of recursion?

What are regexp?

Be able to read and understand a 4D array.

Bullets below not on final Fall/2016

·  (Not on Fall/2015) What is the difference between Collection and Collections?

·  (not in Fall/2015 or spring/2015 final) What is a set, map and list?

·  What is a Link List?

·  Given char A --> char B --> Char C;

·  how would you write the class for the above data, link?
Include class name properties and a single constructor.

·  What are generics? How do you define one?

·  (Not on Fall/2015) What are some of the key static methods of Collections?

·  (not on Fall/2015) What is jUnit testing?, what are the java annotations, what is the Assert class and methods?

1.  Write a method, that when passed an array, will return a new array with all values doubled.

2.  Given a class called House, each House has x number of doors and x number of windows. Write a class describing house; How many instance variables does it have? How many accessors does it have? How many mutators does it have? Assume it has two constructors; one is the default null, and the other sets all instance variables. Write the class, its instance variables, constructors, accessors and mutators.

3.  Write a for loop that prints out the number 1..10, squares and square roots.

4.  What is method overloading, and overriding?

5.  What is a wrapper class, can you give me an example?

6.  What is the difference between continue and break?

7.  A switch statement deals with integer and string expressions. Can you also include floating point expression some how?

8.  What is the eve class of all Java Classes.