Java Programming

Location: Room 223B, 德田館
Time: 0900 ~ 1200, Saturday and Sunday


``Java is C++ without the guns, knives, and clubs.''
-- James Gosling, co-inventor of Java (1955-)

Instructor information

Wifi Access

Objectives

This course is designed for the students who want to learn Java but have no programming experiences before. We will start with the very beginning of program design and fundamental concepts about programs and machines. You are expected to be capable to implement your idea in Java independently after 30 hours of lectures. Furthermore, I wish you could learn other programming languages without suffering from starting over.

The topics delivered in the following weeks are as follows:

In my humble opinion, I think I am trying to show you a big picture about COMPUTER SCIENCE.

Prerequisites

Text

Overview

Procedural programming

Object-oriented programming

Utilities

Data structures and algorithms

Design patterns

Schedule [ 247, 250, 251, 252, 253, 254, 255, 260, 261, 263, 265, 266, 268, 269, 271, 274, 275, 276, 277, 278, 280, 281, 281n, 282, 283, 284, 286, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 301, 304, 305, 306, 307, 308, 310 ]

Date Summary
2019.3.9 programs, computational solutions, computer systems (CPU-memory model, memory hierarchy), programming languages (high-level/assembly/machine code), algorithms, JDK + Eclipse, first Java program;
2019.3.10 variables, data types (int, double, char, boolean) (see computer arithmetics), assignment operator (=), arithmetic operators (+, −, *, /, %), type conversion, casting, rational operators (>, <, ==), logical operators (!, &&, ||, ∧); HW0: Lab 0;
2019.3.16 compound arithmetic operators (+=, ++), reference types, Scanner object, selections (if-else if-else, switch-case-default, ?: operator), while loops;
2019.3.17 loops (do-while, for; also see pp. 8-10 of the slides 20180824.pdf programming games); HW1: Lab 1 due 3.23;
2019.3.23 jump statements, nested loops, analysis of algorithms (you may refer to the slides of analysis of algorithms for further details);
2019.3.24 arrays, for-each loops, briefing data structures, sorting algorithms, searching algorithms; HW2: case (c) and (d) of printing stars, Lab 2 and 3 due 3.30;
2019.3.30 higher-dimensional arrays, methods, call stack, scope of variable, method overloading;
2019.3.31 recursion, classe & object (also see what makes OOP ``good''?), fields and methods, encapsulation, constructor, this operator, static members; HW3: Lab 4 due 4.13;
2019.4.13 garbage collection, HAS-A relationship (aggregation) (you should know memory and objects), IS-A relationships, inheritance, super operator, method overriding (worth to study relationBetweenClasses_slides.pdf), subtype polymorphism, up/down casting, instanceof operator;
2019.4.14 final variable/method/class, abstract class/method, interface, wrapper classes, immutable objects, enum types, namespace, nested classes, anonymous classes, iterators, packages, assertion and exception handling, strings, regular expressions (see regex by Oracle, or regexone, regex crossword), file NIO (Chapter 10: File System), events, listeners, callbacks, Java graphics and GUIs, Java event handling, Java 2D games tutorial (see snake game); feedback; HW4: Lab 5 due 4.20 (note that this is also the due date for all homework submissions);
Promotion Java Programming 2;

Sample code

Programming Labs

Grading Policy Since Java 3nn, I've canceled the final exam for your final grade. As the minimal requirement to acquire the course certificate, you need to finish all labs w/o OPTIONAL. I suggest that you could try optional labs as many as possible.

Homework Submission Send the source code (the file with .java extension) to my email shown in the beginning of this page. Remember to indicate this class number, your full Chinese name, and homework number in your email title. For example, [Java310] Homework 1 盧政良. Do not attach any class file because any executable file will be ruled out by Gmail.

Gradebook

References

Java (introductory level)

Java (advanced level)

Data structures and algorithms

Object-oriented analysis and design

Computer organization/architecture

Misc

Additional reading