Skip to content

An intermediate course about object oriented programming and Java

Notifications You must be signed in to change notification settings

Andrea99-beep/ooprogramming

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Object Oriented Programming (DIEF, UNIMORE)

This is an intermediate programming course about the Object Oriented methodology and Java. We recommend this course to learners who have previous experience in software development or a background in computer science. At the end of this course, learners will be empowered to create a real-world Java program. In achieving this goal, students will learn the fundamentals of Object Oriented Programming, how to leverage the power of existing libraries, how to build graphical user interfaces, how to use some core algorithms for searching and sorting data and how to read and write data both locally and from the network.

Software

Web Tutorials

Web Exercises

Books

  • Programmazione a oggetti in Java; Giacomo Cabri, Franco Zambonelli (beginner)
  • Thinking in Java; Bruce Eckel (intermediate)
  • Effective Java; Joshua Bloch (advanced)
  • Design Patterns; Eric and Elisabeth Freeman (advanced)

Videos

Slides, code examples

Slides, books, and code examples can be found here and downloaded using git:

$ git clone https://github.com/nbicocchi/ooprogramming.git

Both slides and code examples might be updated or bug-fixed during the course. At any time, for downloading the latest version, go the course material directory (on your pc) and use:

$ git pull (in case of errors: git reset --hard; git pull)

Code examples can be directly imported and run in Eclipse with:

File -> Import -> General -> Existing Projects into Workspace

Modules

[M1] From C to Java

  • The software crisis
  • Classes, objects and code modularization
  • Encapsulation, Inheritance, Polymorphism

[M2] OOP Basics

  • The Java environment
  • Primitive types
  • Control statements
  • Scope, Visibility, Overloading
  • Classes and Packages
  • Methods and attributes
  • Getters and Setters
  • Constructors

[M3] OOP Inheritance

  • Overriding
  • Polymorphism
  • Upcasting and Downcasting
  • Abstract Classes and Interfaces

[M4] The Collections Framework

  • Iterable, Collection (Set, Queue, List) and Map interfaces
  • HashSet, PriorityQueue, ArrayList, LinkedList, HashMap classes
  • Iterators (definition and use)
  • Sorting (Comparable Interface and Collections static methods)

[M5] Java Generics

  • Array Sub-typing
  • Object Sub-typing
  • Collection Sub-typing
  • Bounded Wild-cards Types
  • Code Erasure

[M6] Exceptions

  • Motivations and basic concepts
  • Catching Exceptions (try/catch/finally)
  • Throwing Exceptions (throw)
  • Complete and partial delegation (throws)
  • Exceptions (checked and unchecked) and Errors

[M7] Swing Framework

  • Graphical event-based programming
  • Containers and Components
  • Layout managers
  • Event delegation model

[M8] Java Database Access (JDBC)

  • Database connection architecture
  • Connection, Statement and Resultset classes
  • Scrollable, Updateable Resultsets
  • Accessing Metadata

[M9] Remote Data Access (REST)

  • Motivations and basic concepts
  • Resources, Representations, Operations
  • GET/POST requests
  • JSON, XML

[M10] Java I/O Framework

  • Stream concept
  • Reader/Writer interfaces and their implementations
  • InputStream/OutputStream interfaces and their implementations
  • Serialization (Deep/Shallow)
  • Tokenizers (Scanner/StringTokeniser classes)
  • Filesystem manipulation (File/Files classes)
  • Random Access Files

[M11] Threads

  • Motivations and basic concepts
  • Thread states
  • Creating, running and stopping threads
  • Basic synchronisation (synchronised/sleep/yield/join)

[M12] Threads Synchronisation

  • Race conditions
  • Deadlock, Livelock, Starvation
  • Advanced synchronisation (wait/notify)

Exam

The final exam is a discussion about both the home project and theoretical aspects concerning Java and OOP techniques. It is worth noticing that the project is not supposed to be developed alone without supervision, but mostly during the course. The whole development process and related discussions with Prof. Bicocchi will be evaluated. Students are expected:

  • to pass an oral examination about OOP techniques and the Java language (short written exercises might be used, see topics above)

  • to successfully discuss about the structure, the internals and engineering choices of their home project

FAQ

Can we develop the project in groups of 1 or 3 people?

No, groups must be composed of two 2 people. There are no exceptions. The use of git for developing and sharing code is strongly advised. People unable to find a teammate should write to me.

Which kind of project can we do?

You can code a video game, a mobile app, a managing software. Concerning video games, Unity is allowed but the project must contain a significant portion of object oriented code.

How big the project has to be?

A project comprised of 1000-3000 source lines of code is enough to grasp the feeling of what developing software means.

What is the best moment for starting the project?

The first half of the course concerns basic topics that must be assimilated before starting. My personal suggestion is to start the project around midterm and use the second part of the course to sketch out the main design.

While developing I get strange errors. What should I do?

The first thing to do is copy and paste the error string on Google and check for eventual answers on StackOverflow. The vast majority of common errors has a dedicated page.

If I need help, should I write an email to book an appointment?

No! You can directly come to my office during receiving hours. Wednesday 10 - 13, building 27, I floor.

How does the exam is evaluated?

The final grade is the arithmetic average between the home project and the oral examination on Java and OOP techniques. For avoiding delusions, please study the theoretical part as well as having fun with the project!

About

An intermediate course about object oriented programming and Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 52.4%
  • HTML 39.3%
  • CSS 4.3%
  • JavaScript 2.5%
  • TSQL 1.5%