教學大綱表 (113學年度 第1學期)
請遵守智慧財產權,勿使用非法影印教科書,避免觸法。
課程名稱
Course Title
(中文) 程式設計(二)
(英文) Computer Programming
開課單位
Departments
資訊經營學系
課程代碼
Course No.
N1252
授課教師
Instructor
胡志堅
學分數
Credit
3.0 必/選修
core required/optional
必修 開課年級
Level
大二
先修科目或先備能力(Course Pre-requisites):程式設計(一) 已經修過且通過;或程式設計(一) 之學期成績50 分(含)以上
課程概述與目標(Course Overview and Goals):
1. 讓學生瞭解物件導向的觀念,並學會撰寫物件導向的程式,特別是熟悉Java程式語言OOP。

2. 融入教育部【教學實踐研究計畫】於教學,修課同學須配合研究計畫之規範。

3. 課堂之上機程式實作練習之範例,大都來自教科書;請自備教科書以利隨堂練習題撰寫。

4. 部分小考採用Open book 形式,考試時僅能採用自己的教科書,不能互借教科書,避免夾帶不當訊息,以維持考試公平性。

教科書(Textbook) Java物件導向程式設計: 理論與實作 (第2版)
作者:胡志堅
出版社:新文京開發出版股份有限公司
出版日期:2024/07/05
參考教材(Reference) P. Deitel and H. Deitel, 2020, "Java How To Program - Late Objects Version, 11/e," Pearson. ISBN: 1292273739
課程大綱 Syllabus 學生學習目標
Learning Objectives
單元學習活動
Learning Activities
學習成效評量
Evaluation
備註
Notes

No.
單元主題
Unit topic
內容綱要
Content summary
1 程式設計與開發環境(Object-Oriented Programming and Java) 1. Introduction to Java and OOP
2. Programming and Java
3. A typical Java development environment
OnlineGDB
method-call stack and stack frames
1. Introduction to Java and OOP
2. Programming and Java
3. A typical Java development environment
上機實習
講授
 
2 類別與物件概念 (OOP Basic Programming Constructs) 1. Fundamental Data Types
2. Decisions & Control structures
3. if single-selection statement
4. if ... else double-selection statement
5. Iteration
1. Fundamental Data Types
2. Decisions & Control structures
3. if single-selection statement
4. if ... else double-selection statement
5. Iteration
理解封裝與Setter、Getter方法
Understand what method overloading is and how to create overloaded methods.
上機實習
講授
 
3 類別與物件概念 (Methods, Setter, Getter ) 1. Program modules in Java.
2. static methods, static variables and class Math
3. declaring methods
4. notes on declaring and using methods
5. Methods, Setter, Gette
5. 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.
上機實習
講授
 
4 類別與物件深度理解 (Class, Method, Constructor) Argument promotion and casting
Java API packages
Scope of declarations
Method overloading
Category, Constructor, and Methods
Access Control of Members
Utilization of Constructors and Overloading
Learn about argument promotion and casting.
Understand how the visibility of declarations is limited to specific regions of programs.
Understand what method overloading is and how to create overloaded methods.
上機實習
講授
實作
 
5 繼承的基礎觀念 I (Fundamental Concepts of Inheritance I) Introduction
Instance variables, set methods and get methods
Default and explicit initialization for instance variables
Basic Concepts of Inheritance
Learn what primitive types & reference types are.
Learn Concepts of Inheritance
上機實習
講授
實作
 
6 繼承的基礎觀念 II (Fundamental Concepts of Inheritance II) Basic Concepts of Inheritance
Method Inheritance
Method Overriding
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.
Use Method Overriding
上機實習
講授
實作
 
7 繼承的進階觀念 I (Object-Oriented Thinking) 1. initial objects with constructors
2. case study: class Account
3. case study: card shuffling and dealing simulation
4. 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.
上機實習
講授
實作
 
8 期中考 (Mid-Term) 期中考 (Mid-Term) 期中考 (Mid-Term) 期中考
 
9 繼承的進階觀念 II (Object-Oriented Thinking II) 1. Important Concepts of Inheritance
2. Advanced Design for Method Overriding
3. controlling access to members
4. referring to the current object's members with the this reference
5. overloaded constructors
6. default and no-argument constructors
Notes on setter and getter 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.
上機實習
講授
實作
 
10 繼承的進階觀念 III (A deeper look of classes and objects) 1. Composition
2. enum types
3. garbage collection
4. static class members
5. static import
6. final instance variables
7. 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.
上機實習
講授
實作
 
11 抽象類別 I (Object-oriented programming: Inheritance) 1. introduction
2. supperclasses and subclasses
3. protected members
4. Framework-based programming using Java API
6. Design patterns
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.
上機實習
講授
實作
 
12 抽象類別 II (Object-oriented programming: Inheritance) 1. relationship between superclasses and subclasses
2. constructors in subclasses
3. class Object
4. abstract method and abstract class
5. Features of Object-Oriented Programming
6. Introduction to Abstract Classes
7. Design of Abstract Classes
8. Examples of Abstract Class Application
Understand inheritance & how to use it to develop new classes based on existing class.
Learn the notations of supperclasses & subclasses & the relationship between them.
Learn the functionality of abstract method and abstract class.
Use keyword extands to create a class that inherits attributes and befaviors from another class.
Using access modifier protected.
上機實習
講授
實作
 
13 介面 I (Object-Oriented Programming: Polymorphism and Interfaces) 1. introduction
2. polymorphism examples
3. demonstration polymorphic behavior
4. abstract classes and methods
5. 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.
上機實習
講授
實作
 
14 介面 II (Object-Oriented Programming: Polymorphism and Interfaces) 1. Allowed assignments between superclass and subclass variables
2. Final methods and classes
3. A deeper explanation of issues with calling methods from constructors
4. Creating and using interfaces
5. Scenarios for Using Interfaces
6. Examples of Interface Application
Learn how polymorphism makes systems extensible and maintainable.
Determine an object's type at execution time.
Declare and implement interfaces.
上機實習
講授
實作
 
15 例外處理 (Exception Handling Introduction) & 泛型與集合 (Generic Collections Overview) Exception Handling:
1. Example: divide by zero with exception handling
2. Example: handing ArithmeticExceptions and InputMismatchExceptions
3. Java exception hierarchy
4. Chained exceptions

Generic Collections:
1. type-wrapper classes
2. autoboxing & auto-unboxing
3. interface Collection & class Collections
earn 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.
Learn what collections are.
Learn what collections are.
上機實習
講授
實作
 
16 期末考 (Final exam) 期末考 (Final exam) 期末考 (Final exam) 期末考
Final exam  
彈性教學週活動規劃

No.
實施期間
Period
實施方式
Content
教學說明
Teaching instructions
彈性教學評量方式
Evaluation
備註
Notes
1 起:2024-11-15 迄:2024-12-25 5.小專題 Project Java領域小專題: 1.隨機選定題目; 2.根據選定題目,實作或分析探討該主題之程式設計; 3. 完成書面報告(word),以及PowerPoint; 4. 完成口頭報告 程式設計; 完成書面報告(word),以及PowerPoint; 完成口頭報告


教學要點概述:
1.自編教材 Handout by Instructor:
■ 1-1.簡報 Slids
■ 1-2.影音教材 Videos
□ 1-3.教具 Teaching Aids
■ 1-4.教科書 Textbook
□ 1-5.其他 Other
■ 2.自編評量工具/量表 Educational Assessment
□ 3.教科書作者提供 Textbook

成績考核 Performance Evaluation: 期末考:30%   期中考:30%   彈性教學:10%   上機測驗:10%   平時考:10%   作業:10%  

教學資源(Teaching Resources):
□ 教材電子檔(Soft Copy of the Handout or the Textbook)
□ 課程網站(Website)
教學相關配合事項: (融入教育部【教學實踐研究計畫】於教學,修課同學須配合研究計畫之規範)
課程網站(Website):Tronclass
扣考規定:https://curri.ttu.edu.tw/p/412-1033-1254.php