This project was developed in 2022 and no longer active
ส่งงานที่ https://classroom.github.com/a/zFxVAMJK
ให้นิสิตสร้าง JavaFX Application สำหรับเพิ่มคำศัพท์ และความหมายในพจนานุกรม
- มี UI หน้าแสดงคำศัพท์ทั้งหมดในคลังคำศัพท์ ที่สามารถเลือกคำศัพท์แล้วแสดงชนิดของคำศัพท์ ความหมายของคำศัพท์ และตัวอย่างประโยคจากคำศัพท์
- มี UI หน้าเพิ่มคำศัพท์ ที่ระบุคำศัพท์ ชนิดของคำศัพท์ (parts of speech) ความหมายของคำศัพท์ และตัวอย่างประโยคจากคำศัพท์ (เพิ่มได้หลายประโยค)
- ใช้ Collection and Map ในการเก็บคำศัพท์ในโปรแกรม
- ใช้การอ่านเขียนไฟล์ในการเก็บคำศัพท์เพื่อให้การเปิดโปรแกรมครั้งถัดไปมีคำศัพท์
- push ที่ Github Classroom
-
A free version of naiithink's Dictionary1
-
Generics
-
Type bounding
Type<T extends Class<?>>
-
Wildcards
Upper bound
<? extends Class<?>>
Lower bound
<? super Class<?>>
-
-
The relationship of generics
- Covariance (more specific)
- Contravariance (less specific)
- Invariance (truely specific)
-
PECS - Producer Extends Consumer Super
class Cat { private String name; public Cat(String name) { this.name = new String(name); } // ... } class Kitten extends Cat { public Kitten(String name) { super(name); } // ... } List<Kitten> kittens = new ArrayList<>(); List<? extends Cat> cats = kittens; cats.add(new Cat("eiei")); // compile-time error
We cannot add a new
Cat
to the list ofKitten
.
List<Kitten>
is a subtype ofList<? extends Cat>
. -
The collection framework
classDiagram Iterable <|-- Collection Collection <|-- List Collection <|-- Set <<interface>> Iterable <<interface>> Collection <<interface>> List <<interface>> Set class Map { <<interface>> }
java.util.Map<K, V>
and its subtypesjava.util.List<E>
and its subtypesjava.util.Set<E>
and its subtypes
-
Lambda expressions and
@FunctionaInterface
An interface with only 1 abstract method.
java.util.function.Function<T, R>
java.util.function.Predicate<T>
java.util.function.Supplier<T>
java.util.function.Consumer<T>
-
java.util.Optional<T>
class -
java.lang.Thread
class -
java.util.concurrent
package -
Thread safety
-
Design patterns
- Observer (events)
- Singleton
-
Type safety and reflection
-
Improving to make it more universal - naiithink's StageManager
- Data manipulations Relational database
- MVC::Model Word with multiple entries, based on grammatical classes, aka part of speech
- Reflection Annotation to check if passed argument is an instance of a certain class, and other different contexts
- IO Dynamic file resource manipulations
Footnotes
-
Currently, I have no plan to develop any other versions of this app. ↩