OOP in Java
Semester II · BCA 153 · 3 credits
0 / 6
chapters done
-
The syllabus asks for
- Object-oriented programming
- How Java works
- Types, operators and conversions
- Control flow and arrays
- Input and output
- From idea to running program
- Eight features of Java
Key points
- OOP organises programs around objects that combine state and behaviour, with four guiding pillars.
- Java compiles to bytecode that the JVM runs; the garbage collector manages memory.
- Primitive types are fixed-size and overflow silently; reference types are objects on the heap.
- Control statements, arrays and formatted I/O are the foundation for the class design of the next unit.
-
The syllabus asks for
- Defining a class
- Members, this, static and final
- Access control and packages
- References, parameter passing and memory
- toString, equals and hashCode
- Enums, records and nested classes
- Seeing references: stack and heap
- Eight benefits of good class design
Key points
- A class defines the state and behaviour of its objects; constructors create valid objects.
- Encapsulation through private fields and validated methods keeps objects consistent.
- Static members belong to the class; instance members belong to each object.
- References explain aliasing, parameter passing and why equals/hashCode must be overridden for value-like classes.
- Enums, records and nested classes express fixed sets, data carriers and helper types.
-
The syllabus asks for
- Inheritance
- Polymorphism and dynamic dispatch
- Abstract classes
- Interfaces
- The Object class and design guidance
- One call, many behaviours
- Eight uses of inheritance, polymorphism and interfaces
Key points
- Inheritance reuses and specialises; constructors chain upward.
- Overridden methods are chosen at run time by the object's class, which is what lets one loop handle many shapes.
- Abstract classes share implementation among related types; interfaces define capabilities and enable lambdas.
- Good designs favour small interfaces and composition, keeping subclasses substitutable for their parents.
-
The syllabus asks for
- Exceptions
- Strings
- Wrapper classes, Math, dates
- Two pictures: the exception family and the string pool
- Eight benefits of exception handling and of immutable strings
Key points
- Exceptions separate error handling from normal logic; the compiler enforces handling of checked ones.
- try-with-resources and finally guarantee clean-up.
- Strings are immutable shared objects; builders make repeated modification efficient.
- Wrapper classes bridge primitives and objects, with pitfalls around null and ==.
-
The syllabus asks for
- Generics
- The Collections Framework
- Lambdas and method references
- Streams
- File I/O
- The framework map and the stream pipeline
- Eight uses of collections, lambdas and streams
Key points
- Generics make collections type-safe, and the framework offers the right structure for each access pattern.
- Choosing between list, set, map, queue and their implementations is a question of ordering, uniqueness and cost.
- Lambdas and streams express filter-map-reduce logic concisely and safely.
- File I/O is done with buffered, closed-after-use readers and writers or the Files helpers.
-
The syllabus asks for
- Threads
- GUI programming with Swing
- Database access with JDBC
- Putting it together: a small project design
- Threads, servers and databases in pictures
- Eight uses of threads, GUI and JDBC
Key points
- Threads give concurrency, but shared mutable state needs synchronisation to avoid races and deadlocks.
- Executors, atomics and concurrent collections are safer than raw threads and locks.
- GUI programs are event driven: components register listeners and long work moves off the UI thread.
- JDBC connects Java to SQL databases; prepared statements and transactions make it safe.
- A real project combines classes, interfaces, generics, collections, exceptions, I/O, threads and a database.
No chapter matches. Try another word.
The paper
TU assessment: 60% final examination set by the university, 40% internal (assignments, lab work, attendance). Confirm the split in your college's notice.