Logout

Java Revolution

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.

pdf Firefox plug-in for Mac OS 10.6 if pdfs don't open within your browser.

The Boot-Camp

(working up, through to the end of SL Topic 2)

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 - Miscellaneoud "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 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) *****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

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 some simple notes here would be good - more detailed notes in the second spiral 642 a Flash game example of recursion 645 stacking and recursion analogies 647 recursive problem-solving little-old-lady style

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

(very quick spiral 2 through the SL stuff) 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 ---> 2012-14, with new curriculm: Even quicker dip in to address certain things not covered yet. The review function of the Second Spiral is covered with Insta-Java-Revolution exercises and text-based games done at home while wading through the epic full GUI search and sort of objects. <---

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

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)

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) HL MA 19

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 HL MA 8

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 HL MA 16
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 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***) HL MA 4 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 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 2080 (And Merging Two or More Sorted Data Structures...??) HL MA 5 2090 Hashing and Arrays - Hash Table (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 don't have to worry so much about being able to write them from memory. And you don't even have to worry about being able to develop them one step-
at-a time until you get them right... ...Rather, there are two questions you should ask yourself with each one: 1. Do you understand it? (i.e. can you follow it from start to finish.) 2. Can you use it? (i.e. could you copy and paste a version of it from somewhere and adjust it work for you - which is no mean feat for complex code.)
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 HL MA 12-15 - List Option 2140 notes Linked Lists - Adding Various Places (non-stack/queue) HL MA 12-15 - List Option 2145 notes Linked Lists - Removing (non-stack/queue) HL MA 12-15 - List Option 2150 animation Adding and Removing from Front & Back 2155 Linked Lists - Error Preventing Methods HL MA 12-15 - List Option a Flash animation would be nice 2160 code Specific List Implementation (as a stack) 2165 app (JSR Note: project in site, next to the app.) this section could be more general-list oriented, rather than stack oriented, though note that a list as simply a list is kinda useless compared to trees etc.
IV - Listed Implemented as Stacks and Queues 2170 deja vu Stacking Analogy 2175 notes Stacks (implement by a linked list) HL MA 12-15 - Stack Option 2177 code 2180 animation (From the List section above.) 2182 notes Queues (implement by a linked list) (same as Stacks notes above) HL MA 12-15 - Queue Option 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 HL MA 12-15 - Tree Option 2202 animation 2210 notes Binary Search Trees - Traversing Recursively HL MA 12-15 - Tree Option 2212 animation 2220 notes Binary Search Trees - Searching HL MA 12-15 - Tree Option 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 HL MA 12-15 - Tree Option
(Very difficult: Self-study/research for those interested.) 2230 VI - Hash Tables 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. HL MA 12-15 - Hash Table Option 2239.5 notes Hashing and the Bitcoin System VI - Arrays ----> ATDs 2240 video Migrating an array to a Stack or Binary Tree **** HL MA 12-15 *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.)

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.) HL MA 17

2270 notes Deleting Data From an Ordered Sequential File (without reading into RAM.) HL MA 18 (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 HL MA 9 2282 code Plus Morelli pages 332 - 334 2284guestNotes String Tokenizer

2290 notes RandomAccessFile Class Basics 2300 notes RandomAccessFile Adding and Searching Sequentially HL MA 1 & 3*
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 HL MA 1 & 3*
2332 code an animation would be Great to add at some point. 2340 (notes) RandomAccessFile Deletion Using Flag HL MA 2 * & **: To get 3 MAs, better via hashing.

Java As Object Oriented II

2350 notes Encapsulation & the Reasons For Encapsulating HL MA 8 2360 notes Polymorphism & Examples (aside from overloaded constructors) HL MA 6 2370 notes Inheritance Implementation HL MA 7 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 HL MA 10 (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: - - - -