|
Mr. Rogers AP
Computer Science A - Third Quarter Objectives |
Syllabus
|
Latin/Greek Root Words
|
|
|
(Comp
Sci
connection) |
|
|
Essential Question:
How can we search and sort millions of volatile pieces of similar
information without having to create millions of lines of code? |
Chapter 13: Searching Sorting and Other Array Elements
- Sequential
and binary searches: Write the code .
- Given a set of data records be able to pick the above search method which
will be likely to run the fastest.
- Write the code which can find the largest or smallest element in an array.
- Correctly use loops for the following:
- traversals
- insertions
- deletions
- Selection sort: Write the code
.
- Initialize an int variable n to the largest index
in the
array.
- Find the biggest in the first (n) elements
array.
- Swap the biggest for the element n.
- Perform n - -
- Repeat while n >= 1.
- Be as one with the descriptions of the three sort
methods mentioned on page 342
- selection sort
- insertion sort
- merge sort
- Given a set of data records be able to pick the above sort method which
will be likely to run the fastest.
- Name the search and sort algorithms which could be categorized as divide
and conquer techniques.
- Be aware of the methods associated with the Array class.
- Be as one with chapter 3 of Gridworld.
- Homefun: Exercises 1-5,
- Programming assignments: Lab 12.5 Rotate an Array,
Lab 12.9 Benchmarks, 12a,b,c (p. 319).
12.1 Array Search
- Create a program with an integer array containing 20
random numbers. Use code to initialized the array with random integers from 0 to
100. Using command line input search the array for a specific number.
Output the entire array, the highest value, the lowest value, and the index
number where the number you searched for was found or a statement that the
number was not found.
- Add a selection sort (write
the code, see p. 332) to the above and output the sorted
array by creating a Sort class with selection sort method in it.
-
Add the code for a binary search which will then
search for the element specified earlier in command line input.
Test: Chap 13 Objectives 1-6
|
Essential Question:
How does Java allow a program to read and write to the hard drive? |
Chapter 14: Streams and Files
Note:
Chapters 14 covers
items not typically not found on the AP exam but will be useful in creating your
personal project.
-
State the 2 major categories of files.
-
binary
-
ASCII or Unicode (text)
-
Describe how the lines in text files are ended ( CR+LF).
-
Be as one with the following vocabulary:
buffer, stream,
random-access file.
-
Be aware that a stream can be opened for input or output but
not both at the same time.
-
Be aware that a random access file can start reading or
writing at any point in the file. It can be opened for both reading and
writing at the same.
-
Be aware that text files tend to have different lengths and
are usually treated as streams while binary files of fixed length are treated
as random-access files.
Note:
Chapters 15, 16, and
17 deal with graphics, GUI components, mouse, keyboard, sounds and images. These
items are typically not found on the AP exam but will be useful in creating your
personal project.
Assignment: Continue working
on your personal project.
- GridWorld Part 3: GridWorld Classes and
Interfaces
- In Class Group Activity:
We will do
the group activity at the end of Chapter 4 in class
- HomefunRead Chapter 3 , Do you know? Set 6
-