Final Exam
Final Exam
while will check if the judge is right or not before the loop is work. do-while will
check if the judge is right after the loop is finish.
for will list out all the working of loop at the beginning. while will only list the judge
out. row major
FileInputStream is for reading a file. The input will be bytes. FilterInputStream is for
reading informations( The input ways are not limited in file input ). However, the
Filter Stream will change the bytes into useful type. Such as integers, doubles, or
strings.
TextField 與 TextArea 差別
TextField is for oneline texting.
TextArea is for block texting.( Multiply line input )
Polymorphism 是啥
Polymorphism means that a variable of a supertype can refer to a subtype object.
Polymorphism 代表著超類的變數可以引用子類物件。
inner class 編譯後會產生甚麼名稱
OuterClassName $ InnerClassName
RuntimeException
ArithmeticException NullPointerException IndexOutOfBoundsException
IllegalArgumentException more…
Pane 寫三個
FlowPane GridPane BorderPane HBox VBox StackPane abstract class 不能創造物件
的 class, 但可 contain abstract methods that are implemented in concrete
subclasses. interface An interface is a class-like constructor for defining common
operations for objects. shallow copy V.S deep copy Shallow copy Copy A objects’ data
to B objects’ means B objects’ pointer point to the memory place that puts the data.
This will cause the change in object A if B object change the data. Deep copy Copy A
objects’ by clone the whole object to B object. The object in B is uncommitted with
A.
Override V.S Overload
Overload define multiple methods with the same name but different signatures
Override provide a new implementation for a method in the subclass.
constructor 的回傳值
沒有
懶人翻譯包
Aggregation 跟 Composition 最大的差異在於從屬關係和類型
Aggregation 屬於低依賴關係,兩者會擁有上下關係,但又互相獨立於對 方,
舉例來說: 公司員工,員工的基本資料狀態並不會受到到底在哪間 公司工作影
響( 性別是男生不會跑到別的公司就變成女的 ),因此任意 關係的一方的任意
改動是不影響另一關係的,Aggregation 適合使用在重 複使用 code 的部分( 關
係重組不影響任意 class 本身 )
Composition 屬於高依賴關係,屬於受限形式,在組成上兩者相互依賴, 任
意部分改動都會影響整體,例如圖書館和藏書的關係,圖書館沒有了 ,屬於這
個圖書館的特色書籍救也會消失。
static variable 所有人共用的變數
Static is using for declaring “static” something in program. What is the difference of
static member or not?? For example, if a data member in class is static data member.
And there is ten different objects have used this data member. When one is work.
The all static data will be change.
RadioButton
RadioButton 讓你可以在很多選項中抓出單一項目
讀檔跟寫檔跟是用什麼 class
FileInputStream, FileOutputStream 判斷 button 是否觸發
The button is an event source object where the action originates. Need to create an
object capable of handling the action event on a button. The object is call event
handler. And the handler must be registered with the event source object if we need
it to work.
愚蠢加分題
助教名字 孫嘉宏 助教 office hour 3:40 P.M.~ 6:30 P.M. Monday and by
appointments
老師名字 ???
老師 office hour 12:30 P.M. ~ 1:30 P.M. Friday and by appointments
課本作者名 Y. Daniel Liang