The New Java Revolution

(A revolution for new times (and new IB CS curricula...)

Revolve means to turn around, and so during the central "Revolutionary" stage of "Java Revolution" we'll start at what conventional programming teaching would call the end, and we'll work our way backward...

The idea with the "Revolutionary" stage is to start with our destination, and break it down, and down, and down, until we get to the conceptual basic building blocks. And then we'll build back up again, with a Java implemented solution.
For the S.L. stuff, this will amount to a second spiral through the material. (Through the 2010-11 iteration of this idea, the revolutionary stage was central, but limited. In the future it is possible for this revolutionary idea to be extended so much, that the theoretical/conceptual destination is the starting point from day one, with little or no Java will be introduced at all until everything has been broken down.
- "It's not about the programming language, it's about the ideas and algorithms."
(testy guy at CVUT Cybernetics department.) *** (Rated Epic) indicates that it's tons of information and very cerebral, at times beyond the minimum requirements of IB, but all good stuff, and well worth understanding if you can.

The Extended Boot-Camp - enabling reading/understanding if not full writing

(working up, through to the end of required "dossier" content)

This could happen in tandem with the first part of the Java Revolution curriculum, just to whet your appetite. Though at this point it will be in an almost blind, get-your-feet wet, sort of way.

<Begin basics approach> *****Reminder to self: try to do more videos (just mov as plugin) and links to dist files in the notes above.***

10 notes Netbeans Projects

20 notes The Simplest Class 30 code10-11 A Sample Class - "Our Cat Says Meow" (without notes; just to see the kind of things that are possible)
40 app video (so basic use of conditionals and loops) 50 code10-11 Sample Class 2 - Miscellaneous "Flow of Control" 60 app video 70 notes Input Using the args Array

80 notes Console Input with BufferedReader 90 notes Java Types 100 notes Casting 110 notes How Computers Work (focusing in on the parts that relate to the types, variables and so on) ***Don't skip this...*** 120 notes Arrays

----> At this point, can do the 2013-14 sequence of --> 2d Arrays --> Searching --> then OOP, --> then Sorting (using OOP)
(and use the casted random ints throughout.)

125 notes Reference Data Types Basics 130 notes For Loop 140 notes The While Loop (and add the Do While loop) 150 notes Math.random() & Math Class Methods 160 Tracing - with Lots of Tracing Exercises (This is on paper, not like Drill and Practice) 170 notes If/Else Conditional Blocks (actual details taught & reinforced) 172 code10-11 174 code10-11 180 Lots of DRILL & PRACTICE Drill & Practice Must Dos: -----> Calculator -----> Grades & Letter & GPA 190 notes Flow of Control 192 notes 1 Methods and Method Calling
194 notes 2 (do a calculator, this time with methods.) 196 notes 3 197 code10-11 (remember that there's another spiral coming up, so not all details needed.) 198 code10-11 200 notes Scope of Variables 210 code10-11 220 notes Public, Private, & Protected 230 notes Initializing Variables and Flag Values 240 notes Miscellaneous Standard Level Java not yet in notes (good as miscellaneous for the review it offers) </Begin reinforcement/Major drill & practice> 250 Major drill and practice: ----> Annotated output on board (for ex., for loop here), and students produced code. ----> "Creative" drill and practice: students do their own program generally around a certain theme. (with, for ex., using the four kinds of methods, one for loop, etc.) ----> Even more general, without specific programming requirements; "Solve this" kind of practice.
</End reinforcement/Major drill & practice>
<Begin Rosetta Stone approach> 260 notes Object Oriented Programming (OOP) Full Theoretical Intro. (Rated Moderately Epic) (Note that at some point previous to this do a program a non-OOP, multiple attribute way, like when you add a letter to the end of a name to indicate something, like "Star Wars-a" for an action movie.) 270 notes OOP "Template Classes" Intro. 280 notes "Template Class" Constructors & Accessor & Modifier Methods 290 code10-11 Multiple class OOP Interaction Example 1 - Bank Accounts (Rated Moderately Epic) 295 diagram 300 code10-11 Multiple class OOP Interaction Example 2 - Ticketing (Rated Moderately Epic) 305 diagram 310 notes Value vs. Reference Parameter Passing (Detailed, possible now that objects understood) notes (This link a briefer summary) 320 notes Arrays of Objects (Searching arrays of objects after GUI intro) <Begin SL Algorithms & basics approach> 325 ---> Practice with 2d arrays needed here, before sorting <--- 330 notes Sorting
335 animation 340 notes Searching 350 notes Intro to Efficiency of Algorithms and "Big O" </End SL Algorithms & basics approach>> <GUI Intro> 370 notes Netbeans GUI Applications Overview 380 GUI swing objects with pre-made properties, and get & set methods (see HW for exploration exercises) 390 More GUI Objects - Check boxes, Radio buttons, and Tables (see HW for exploration exercises) </GUI Intro> 400 notes Searching & Sorting Arrays of Objects (done with GUI) (GUI introduced before this because console based for this is less clear) (Be sure NOT to include a BOOLEAN attribute at this point - very troublesome; see next notes.) 410 notes Searching & Sorting Arrays of Objects, with Boolean Attributes Too. (Note: Rated Epic) 440 notes Conversions Betweeen Types (& particulary as needed with GUI) 460 Full GUI Multi-class GUI OOP with Arrays of Objects II & Sorting with Tables: (but actually, the better/easier strategy of this would have been to simply do a sequential search...) (hmmmm.... and if HL only in the class, leave this to be "Full GUI Multi-class with List/Tree of Objects.) -->But if doing it this way, take it in stages, over a few days of instruction (give Fun Text-based games Challenges for hw.) And the second time through, guide them (with pseudocode instructions), as every second computer I follow after they try the code themselve first (based on the pseudocode instructions). 461 video pt1 GUI including Table 462 video pt2 Sequential Search of Array of Objects (yielding sub-set array) (Rated Semi-Epic) 463 notes Sequential Search of Array of Objects (yieldig sub-set array) Notes 464 video pt3 Binary Search of Array of Objects (yielding sub-set array) (Rated Epic) 465 video all (all 3 parts)

466 FOR SURE do a "refreshTables" method example - lots of trouble in the past with not doing this correctly between tabs of a big project. (The following is brought up from the old Java Revolution "Main Event", and is all you need for your dossier vis-a-vis files.) 2244 code Full Code of What Follows netbeans proj 2245 app code FileWriter or BufferedWriter as Sequential File (& BufferedReader for Files) (Brief impt. note: do use StringTokenizer, as in the example.) 2250 notes Adding and Reading Data To/From an Unordered Sequential File 2280 notes Parsing a Text File Using StringTokenizer 2282 code Plus Morelli pages 332 - 334 2284guestNotes String Tokenizer ***Reminder to self: try to do more videos (just mov as plugin) and links to dist files in the notes above.*** </End SL Algorithms> </End Rosetta Stone approach>

...h a v i n g------- g o n e ------- u p  ------- t h r o u g h ------- S L ------- b a s i c s ------ c o n v e n t i o n a l l y...
...n o w --------- H L --------- t o p --------- d o w n -------- t h e o r e t i ca l l y ...

The (Theoretical) Revolution

(Can be done after Second Spiral, rather than this point.)

Structural Concepts:
(In the reverse of conventional order - starting with the "destination" of H.L.
and working back to the building blocks.
And done without Java, rather in a theoretical way, relatively quickly.) This could/should turn into a more esoteric/theoretical apporach of all remaining topics now, at this point. The revolution does not have to be completely step-by-step backward, rather doing ***all*** of the algorithms in pseudocode now, before moving on to any code, so that the "destination" is seen before carrying on with code.
missing lots of basic notes.

Files (for permanent storage)

T 470 File Orgainzation: notes
490 - Direct Access Files & Hashing notes needed 500 - Indexed Files 510 - Partial and Fully diagram H 520 - Sequential Files diagram

520 Advantages And Disadvantages of Various File Types 525 notes
530 summary diagram
E 535 summary diagram video

Conceptual Building Blocks 1 - Types & Structures:

540 Types, Characters, and ASCII notes needed 542 Literals & Objects - Review and the String exception/example notes (basic) notes and diagram link (not so basic) R 545 Primitive Types, Reference Types, Structures and Abstract Data Types notes

Abstract Data Types Held in RAM

E 560 RAM Structure Options: Arrays, Lists, Trees ADT notes 1 570 Binary Search Trees (RAM) (Adding, Traversing, Searching) basics of lists and trees traversal animation (re-visit after recursion below) 580 Linked Lists (RAM) (Adding, Deleting, etc.) V 582 lists of objects at memory level 584 590 Stacks (RAM) stacking analogy 595 Queues (RAM) O 600 Arrays (RAM) arrays & linked lists in memory 610 Hash Tables (RAM) intro hash table notes 615 ADT notes 2

Conceptual Building Blocks 2 - Flow of Control & Methods:

L 620 Iteration, Conditions and Nested Conditions 630 Methods & Method Calling U 640 Recursion a very Brief Introduction 642 a Flash game example of recursion 645 recursion analogies 645a stacking analogies
recursive stacking in memory (jpg1) (jpg2) 647 recursive problem-solving little-old-lady style 648 recursion example diagrams from the Morelli textbook

Algorithmic Concepts

T 650 BubbleSort & SelectionSort Algorithms 660 Sequential Search & Binary Search Algorithms

670 QuickSort quicksort intro 671 very good instruction from Internet I 672 my animation - ignore code for now

And Back to Types:

(Theoretical bits and pieces for segue to, and preparation for, Spiral 2.) O 690 Integer Numbers and Range

700 Real Numbers and Accuracy

N 710 Boolean Values and Compound Conditions

...a n d --------- b a c k --------- u p --------- w e --------- g o...
...t h i s ---------- t i m e ---------- w i t h ---------- J a v a ...

The Second Spiral - to solidify understanding, and enable writing ability*

* The idea being that at this point it's like me & Czech after a lot of years: I can kinda read it and follow it, but I sure can't speak it. "Listening"/"understanding" and "speaking" a programming langage, just like a regular language
are two entirely different things/stages, and that's natural.
(fairly quick, but important spiral 2 through material covered up to Theoretical Revolution)
a teaching approach which alters between: - review/reinforcement, - deeper theoretical instruction/appriciation, - and training-wheels-off on-their-own problem-solving programming but should be, in class, mostly lots of smallish "puzzel-solving" exercises in Netbeans

As we move through this, you will do several practice labs. Here are some links:

Insta Java Rev Part 1
Insta Java Rev Part 2
Fast Typer Lab
Hangman Lab
Trivia Lab

***** And don't forget to start "Dossier" thinking and process now, with one or two home assignments, even though
still need to get through a lot more code before it can start. *****

Java Building Blocks I: Indispensible "Hello World" Java

*****Reminder to self: try to do more videos (just mov as plugin) and links to dist files in the notes above.*** 740 notes class

750 (...) public static void main(String[] args)
& System.out.println()

760 (...) User Interaction With Console Input 770 notes static - "Class" attributes & methods vs. "Instance" attributes & methods 775 notes final CONSTANTS

Java Building Blocks II: Java & Primitive Data Types

780 notes Strings as Objects vs Literals, & String Equality vs Identity 782 diagram (Rated Epic) 783 diagram (Rated Basic) (& deja vu)
785 notes Strings Processing Methods (IB is fairly big on these)

789 notes Primitives, Casting & Parsing 790 (...) boolean 795 (...) char & Casting

800 (...) int, double and Parsing 805 notes Math Class and Class Methods 810 notes Formatting Classes (like NumberFormat)

815 deja vu Arrays 820 notes 2D Arrays (and nested loops practice first)

Java As Object Oriented I (mainly review)

830 deja vu "Template" classes
835 deja vu 840 notes A Little More... on OOP 845 (...) Encapsulation & private & public

850 deja vu Methods 1: "Get Methods" as methods which Return Values 860 notes Methods 2: "Set Methods" as methods which take Parameters (and the 4 combos of methods)

865 notes A Little More... on Objects 870 (...) new 875 (...) Using object instances - Example: BufferedWriter and BufferedReader 880 (...) Other Examples of Use of Additional Libraries
885 deja vu

Flow of Control & Control Structures

890 deja vu Flow of Control
895 deja vu Control of Flow Through Method Calling

900 deja vu Method Calling, Blocks, and Scope of Variables: { }
905 notes

910 deja vu Conditions: if, else if, and else

915 notes **Not included in new curriculum, but: Switch Statement (***entirely new notes***)

1000 deja... Compound Conditions: &&, ||, and ^

1005 deja... Nested Conditions

1010 deja vu Iteration 1: The While Loop 1015 deja vu Iteration 2: The For Loop

1020 notes Iteration 3: The Do While Loop (***entirely new notes***)

1025 Nested Loops (see looping through 2D arrays)

1030 notes Iteration 4: Recursion (***entirely new notes***) 1032 deja vu Little-old-lady recursion ("do-it-yourself" rather than using standard algorithms) (missed having hw for this April 2011) 1033 exercise Recursion traces 1034 notes Try/Catch and Throwing Exceptions (***entirely new notes***)

Java & GUI

(Don't pooh, pooh this stuff, as it will hold back students if not mastered.) 1060 notes (Miscellaneous GUI Code etc. (Until it all gets worked into try-it-yourself labs)) Discovery Labs: more needed 1065 notes Menu Items 1070 Buttons and Button Groups 1075 Combo Box 1077 Menus, ComboBox Drop-downs, and RadioButton Groups Hints Movie app 1080 Frames & Tabs 1085 Tables Intro 1087 Tabbed Panes, Tables Basics, and Colors app with Hints 1090 Right-clicks 1092 Right-click app with Hints 1095 OptionPanes 1100 Input Dialog Box 1105 Tables cont. setValueAt etc. needed 1110 JFileChooser
(refer to where we do StringTokenizer)

The Main (HL) Event

(jsr Teanching Notes for this: - Ok to have it spill over into second year - actually good to get going again then.
HW: - String a lot of this into one big dossier like project. But hw either slightly different mirro project, and/or much completion - or two projects per hw, compressed into one uploaded hw Teaching Approach for Complex Algorithms: (recursive binary search, linked list, binary search tree) Stage I - Intro.: 1. algorithm stage (up above, in Java Rev.) Stage II - Teaching: 1. diagramatic algorithm on board, 2nd spiral 2. projection on white board of full solution, and diagram again with reference to it 3. pseudocode written on board over code 4. connect to odd screens, and together anticipatoryily code one line at a time (from pseudocode) Stage III - Reinforcement: 1. "just use it" stage within the big dossier-like project continued with additional functionality & tweaking 2. paper 'a la IB' quiz writing out Java solution, but first a diagram

Java Standand Sorting and Searching Algorithms

2000 deja vu Dumb BubbleSort (I.B. Version A) 2010animations Smart BubbleSort (I.B. Version B)
2015 deja vu SelectionSort (I.B. Version A) 2020 diagram SelectionSort Improved (I.B. Version B)

2030 deja vu QuickSort - THE FIRST REVOLUTION ONLY 2035 diagram 2040 animation Now look at it along with the code 2045 code Specific Implementation of Quicksort on an Array 2047 app (JSR Note: project in site, next to the app.) 2050 deja vu
Sequential Search 2060 deja vu Iterative Binary Search 2070 notes Recursive Binary Search a Flash animation would be nice 2090 Hashing and Arrays - Hash Table - THE FIRST REVOLUTION ONLY (If short on time, leave for RAF.) (Refer below to the Files section - all the Hash stuff is there now, since RAFs use hashing.)

Java Abstract Data Types (ADTs)

Student Note: From this point on, as the algorithms and ADTs get increasingly involved, you DO NOT HAVE TO BE ABLE TO WRITE THEM OR EVEN USE THEM IN JAVA. The new curriculum (2012) just erequires you to understand them at a theoretical level, And be able to describe them in pseudocode and diagrams. Nevertheless, the Java Revolution approach is to achieve thorough understanding of the algorithms through investigation of the code. Furthermore looking at the actual code, and producing it, will reinforce all programming concepts covered so far, and act as a good warm-up for dossier programming. I - ADTs In General 2100 deja vu Preliminary notes on ADTs from the Java Revolution - part 1 2105 deja vu " " " part 2
II - Objects As References Review Related From the Revolution Spiral:
2110 deja vu arrays and linked lists in memory 2115 deja vu more on objects at memory level 2120 deja vu value vs. reference parameter passing ** (** This one is not about ATDs per-se. But it is the most thorough "reference" part of The Java Revolution.)
III - The List ADT 2130 deja vu Basics of Lists and Trees 2135 code Linked Lists - Generic Node Class & List Class 2136 deja vu Stack & Queue extension of List (example of OOP inheritance) 2137 code 2140 Linked Lists - Adding Various Places (non-stack/queue) 2145 Linked Lists - Removing (non-stack/queue) brief description only, since a list is kinda useless compared to trees for non-stack/queue dynamic ADTs. 2150 animation Adding and Removing from Front & Back 2155 Linked Lists - Error Preventing Methods a Flash animation would be nice 2160 code Specific List Implementation (as a stack) 2162 project 2165 app
IV - Listed Implemented as Stacks and Queues 2170 deja vu Stacking Analogy 2175 notes Stacks (implement by a linked list) 2177 code 2180 animation (From the List section above.) 2182 notes Queues (implement by a linked list) (same as Stacks notes above) 2185 code elaboration of notes would be good animation needed for queue too
V - The Binary Search Tree ADT 2195 deja vu Basics of Lists and Trees (as above in Lists section) (can choose to start fully understanding code with traversals) 2200 notes Binary Search Trees - Adding 2202 animation 2210 notes Binary Search Trees - Traversing Recursively 2212 animation 2220 notes Binary Search Trees - Searching 2222 code Binary Search Tree and Node Class Code 2223 code Specific Binary Search Tree Implementation 2225 app (JSR Note: project in site, next to the app.) 2227 Binary Search Trees - Various Removal Scenerios
(Very difficult: Self-study/research for those interested.) 2230 VI - Hash Tables THE FIRST REVOLUTION ONLY 2232 notes Hashing and Arrays - Hash Table (could leave for RAF)
2234 code Learning Stage 1: Simple console-based primitive 2236 app code Learning Stage 2: GUI, but all in the same class 2238 code Learning Stage 3: GUI and separate HashTable class 2239 code Full Example: GUI and separate HashTable class, with for tie-breaking.
2239.5 notes Hashing and the Bitcoin System VI - Arrays ----> ATDs 2240 video Migrating an array to a Stack or Binary Tree *For some of the notes, take a look at 2010-11, 2011-12 homeworks.
Note that at some point the big lab will have to be able to display multiple search result records, and also search results based on multiple criteria, but not necessarily the first time through, up in the previous section.

Java and Files

Remember that it is always good to leave a bit of programming for the beginning of second year, so that students' minds can be refreshed right before they have to get into their own programming of their dossier. So leave either these last two topics, or if still time left, do OOP stuff at end of year 1. And leave a final review of binary trees until reaching the programming stage of dossier work. 2245 app code FileWriter or BufferedWriter as Sequential File (& BufferedReader for Files) (Brief impt. note: do use StringTokenizer, as in the example.)

2248 notes Serializable for writing objects and array/ArrayLists of objects easily

2250 notes Adding and Reading Data To/From an Unordered Sequential File 2260 notes Inserting Data Into an Ordered Sequential File (without reading into RAM.)

2270 notes Deleting Data From an Ordered Sequential File (without reading into RAM.) (So for both of the above, it is neccessary to write to a new file.) (And could MA 5, Merging two or more sorted data sturctures be used by reading a sorted file to an array, and then using a merge sort to merge it with another array newly put in memory?)

2280 notes Parsing a Text File Using StringTokenizer 2282 code Plus Morelli pages 332 - 334 2284guestNotes String Tokenizer

2286 image Working with RAM structure <--> Tables <--> Files

2290 notes RandomAccessFile Class Basics THE FIRST REVOLUTION ONLY 2300 notes RandomAccessFile Adding and Searching Sequentially
2310 code 2320 deja vu (Hashing in Hash Tables review - the same techniques used here) (and see code above in the Hash Tables section of ADTs)
2330 notes app RandomAccessFile Adding & Searching Using Hashing
2332 code an animation would be Great to add at some point. 2340 (notes) RandomAccessFile Deletion Using Flag

Java As Object Oriented II

2350 notes Encapsulation & the Reasons For Encapsulating 2360 notes Polymorphism & Examples (aside from overloaded constructors) 2370 notes Inheritance Implementation 2380 code (Note that abstract and interface etc. is not in the curriculum.) + Morelli For inheritance and polymorphishm, do use the Morelli textbook: pages: 133-136 and 350-353 for overriding and 355-356 for overloading 2390 Implementation of A Heirarchical Composite Data Structure (Arrays or linked list of objects, are examples of this, so already done.)

Full Programming Review Videos

2400 video Searches and Sorts Review (SL and HL) 2450 video ADTs Review (HL only) 2500 video Files Review (HL mainly)

+ Miscellaneous good stuff from Morelli that didn't make it anywhere else above, by page reference: - - - -