Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If I were to teach a course on Java or do an online series, here is the outline that I would attempt to follow. Currently incomplete and not fleshed out entirely.
- The Concepts: Part 1
- - Objects
- - Create metaphorical example?
- - Example: A forge cast is an class. The item made by the cast are the objects.
- The Basics
- - Primitives (and String)
- - Byte sizes of types
- - When to use each
- - Short vs Byte vs Int
- - All have no decimals
- - Different minimums/maximums
- - Double vs Float
- - All have decimals
- - Different minimums/maximums and accuracy
- - Syntax
- - Different preferences ({} placeage, tab vs. spaces,)
- - Hello world
- - Console output
- - Calculator
- - Console input
- - Addition, subtraction, multiplication, division, modulus, n'th root, n'th power
- File IO
- - File (java.io.File)
- - Checking if a given file exists
- - Creating files and parent directories if they do not exist
- - Different readers and writers for different situations
- - Saving / reading text
- - Saving / reading an image
- Data Storage
- - Arrays
- - Lists
- - Set
- - Maps
- - The differences and when to use them
- The Concepts: Part 2
- - Encapsulation, Inheritance, Polymorphism
- Classes
- - Static utility classes (Math)
- - Inheritance (extension and implementation)
- - instanceof with objects
- - Bring up modifiers
- - Field/method visibility with inheritance and object referencing
- The Concepts: Part 3
- - Keeping code abstract and reuseable
- Swing GUI
- - JFrame, JOptionPane messages
- - Adding components to JFrame
- - Different layout managers (And null manager)
- - Theory of design (How to make user-intuitive designs)
- - Where to place user input vs output
- - What LayoutManager should be used (Or combination of)
- - Is the program re-sizable?
- - When is padding good?
- - Is there too much to put on a single frame / panel?
- - Using TabbedPanels and other components to keep the user-interface usable
- - Keep content categorized / organized
- Graphics and Hardware Input
- - Drawing on components with Graphics
- - Converting to Graphics 2D
- - Pacman animation with key control
- - Keyboard listener
- - MS-Paint clone with mouse control
- - Mouse listener
- Threading
- - Using threads for tasks that do not need to by synchronous (such as data retrieval for instant use)
- - Saving data
- - Showcase inconsistency of threads(Create dozen threads with same task and show the varying completion times)
- - Concurrency and using threads in complex programs without causing problems (Different threads not accessing the same values and other fun times)
- - It is only mentioned in the course, not explored
- Networking
- - Reading text off of websites (Example usage: version checking)
- - TCP vs UDP argument. Discuss appropriate usages of both.
- - TCP: Client to Server connection
- - Example: Logging into a server. Transferring acknowledgements)
- - Data transfer is ensured and verified
- - UDP: Client to any other client
- - Example: Updating a video feed
- - Data transfer is not ensured
- - Also a lighter load than TCP. Not as intensive
- - Sending data over connections (UDP and TCP)
- - Sending bytes, strings, and objects
- Modular Projects
- - Examples of modular systems in known projects
- - Class loaders
- - Loading individual class files from a URL
- - Loading jar files from a URL
- - Ugly hack that works: Adding jars to the classpath at runtime
- - Discuss quirks such as loading two classes in different loaders and checking for inheritance.
- - Assuming 'Green' extends 'Color'
- - Loaded both in different loaders: greenObject instanceof Color or Color.class.isAssignableFrom(GreenObj.getClass()) returns false.
- - If both are loaded using the same ClassLoader, instanceof and isAssignableFrom will return true.
- Bytecode and Reverse Engineering
- - What is bytecode
- - Known decompilers and their differences
- - How to edit bytecode
- - Existing programs
- - Creating your own
- - ASM, Javaassist, BCEL
Advertisement
Add Comment
Please, Sign In to add comment