課程大綱 Syllabus |
學生學習目標 Learning Objectives |
單元學習活動 Learning Activities |
學習成效評量 Evaluation |
備註 Notes |
序 No. | 單元主題 Unit topic |
內容綱要 Content summary |
1 | Review of Methods |
Program modules in Java.
static methods, static variables and class Math
declaring methods
notes on declaring and using methods
method-call stack and stack frames |
Declare your own methods and call them.
Use common Math methods from the Java API
Understand how the method-call/return mechanism is supported by the method-call stack. |
|
|
|
2 | Review of Methods |
argument promotion and casting
Java API packages
case study: random-number generation
introducing enum types
scope of declarations
method overloading |
Learn about argument promotion and casting.
Use secure random-number generation.
Understand how the visibility of declarations is limited to specific regions of programs.
Understand what method overloading is and how to create overloaded methods. |
|
|
|
3 | review of arrays |
primitive types VS reference types
arrays
declaring & creating arrays
examples using arrays
exception handling: processing the incorrect response
enhanced for statement
passing arrays to methods: pass-by-value vs pass-by-reference
multidimensinal arrays
variable-length argument lists
using command-line arguments
class Arrays |
Learn what primitive types & reference types are.
Learn what arrays are.
Use arrays to store data in and retrieve data from lists and tables of values.
Declare arrays, initialize arrays and refer to individual elements of arrays.
Pass arrays to methods.
Declare and manipulate multidimensional arrays.
Use variable-length argument lists
Read command-ling arguments into a program.
Use the methods of class Arrays. |
|
|
|
4 | Introduction to classes and objects |
introduction
instance variables, set methods and get methods
default and explicit initialization for instance variables |
How to declare a class & use it to create an object.
How to implement a class's behaviors as methods.
How to implement a class's attributes as instance variables. |
|
|
|
5 | Introduction to classes and objects |
initial objects with constructors
case study: class Account
case study: card shuffling and dealing simulation
case study: class GradeBook |
How to call an object's methods to make them perform their task.
What local variables of a method are and how they differ from instance variables.
How to use a constructor to initialize an object's data. |
|
|
|
6 | A deeper look of classes and objects |
case study: Time class
controlling access to members
referring to the current object's members with the this reference
overloaded constructors
default and no-argument constructors
notes on set and get methods |
Use the throw statement to indicate that a problem has occurred.
Use keyword this in a constructor to call another constructor int the same class. |
|
|
|
7 | A deeper look of classes and objects |
Composition
enum types
garbage collection
static class members
static import
final instance variables
package access |
Use static variables and methods.
Import static members of a class.
Use the enum type to create sets of constants with unique identifiers.
Declare enum constants with parameters. |
|
|
|
8 | Mid Exam |
Mid Exam |
Mid Exam |
|
|
|
9 | Object-oriented programming: Inheritance |
introduction
supperclasses and subclasses
protected members
relationship between superclasses and subclasses |
Understand inheritance & how to use it to develop new classes based on existing class.
Learn the notations of supperclasses & subclasses & the relationship between them.
Use keyword extands to create a class that inherits attributes and befaviors from another class.
Using access modifier protected. |
|
|
|
10 | Object-Oriented Programming: Polymorphism and Interfaces |
introduction
polymorphism examples
demonstration polymorphic behavior
abstract classes and methods
case study of using polymorphism |
Learn the concept of polymorphism.
Use overridden methods to effect polymorphism.
Distinguish between abstract and concrete classes.
Declare abstract methods to create abstract classes. |
|
|
|
11 | Object-Oriented Programming: Polymorphism and Interfaces |
allowed assignments between superclass and subclass variables
final methods and classes
a deeper explanation of issues with calling methods from constructors
creating and using interfaces |
Learn how polymorphism makes systems extensible and maintainable.
Determine an object's type at execution time.
Declare and implement interfaces. |
|
|
|
12 | Exception Handling: A Deeper Look |
introduction
example: divide by zero with exception handling
example: handing ArithmeticExceptions and InputMismatchExceptions
when to use exception handling
Java exception hierarchy |
Learn what exceptions are and how they're handled.
Learn when to use exception handling.
Use try blocks to delimit code in which exceptions might occur.
Use throw to indicate a problem. |
|
|
|
13 | Exception Handling: A Deeper Look |
finally block
chained exceptions
declaring new exception types
preconditions and postconditions
assertions |
Use catch blocks to specify exception handlers.
Use the finally block to release resources.
Understand the exception class hierarchy.
Create user-defined exceptions. |
|
|
|
14 | GUI Components |
introduction
Java's nimbus look-and-fell
simple GUI-based input/output with JOptionPane
Overview of Swing components
Displaying text and images in a windows
text fields and an introduction to event handling with nested classes |
Learn how to use the nimbus look-and-feel.
Build GUIs and handle events generated by user interactions with GUIs.
Understand the packages containing GUI components, event-handling classes and interfaces. |
|
|
|
15 | GUI Components |
common GUI event types and listener interfaces
how event handling works
JButton
buttons that maintain state
using an anonymous inner class for event handling
multiple-selection lists
mouse event handling |
Create and manipulate buttons, labels, lists. text fields and panels.
Handle mouse events and keyboard events.
Use layout managers to arrange GUI components. |
|
|
|
16 | Final exam |
Final exam |
Final exam |
|
|
|