Guide: Learning Java
Java in a Week
Get a copy of "Thinking in Java" and start reading it.
Day 1: A Basic Java Program
- Install Eclipse, IntelliJ or the IDE of your choosing
- Determine the version of Java you are using
- Understand the difference between a JRE and a JDK
- Understand CLASSPATH and PATH
- Understand .java and .class files
- Write a simple program that prints out “Hello World”
- Modify the program to print out “Hello your name” 5 times
- Modify the program to take in two command line parameters. Now you should run it with two arguments (java YourProgram name number). The program should printout “Hello” name the number of times specified. For example:
Java MyProgram Bob 4
Should print out:
Hello Bob
Hello Bob
Hello Bob
Hello Bob
Day 2: Working with Objects
- Review control flow options
- If/else
- For
- While
- Switch
- Understand the difference between primitives and objects
- Understand the difference between a Class and an Object (instance)
- Create a new class called Student
- Create some Student attributes
- First name
- Last name
- Id#
- Age
- Zipcode
- Create some Student methods
- addATestResult
- getATestReult
- getGPA
- Create a new class called Tester
- Create a new Student object
- Add some grades
- Print out the students name
- Print out the grade from one of the tests
- Print out the students GPA
Day 3: Designing with Objects
- Review Packaging
- Review Abstract class
- Review Interface
- Review Error Handling
- Design some classes to represent tools a teacher might need
- Student Roster
- Seating Chart
- Grade Book
- Required Features
- Code must be packaged
- Seating chart must use mutli-dimensional array
- Must have two types of Students
- Regular (with getGPA)
- Honors (with getHonorsGPA and get HonorsCourses)
- Must have Two methods for calculating letter Grade
- Straight 10 point increments (100-90, 90-80, 80-70)
- Some type of weighted average
- Read in test Results from a file and then write out high, low and average to a file. File format will be as follows:
TestName Math5
Bob 90.0
Sam 72.0
Mary 85.0
Day 4-5: Application
- Discuss private, protected, public
- Discuss scoping
- Discuss polymorphism
- Discuss inheritance
- Choose a favorite game. Design and implement that game in Java. Graphics are not required. Automated player is not required. Simply design the classes that represent the game and include the functionality for two people to play it.