0% found this document useful (0 votes)
4 views8 pages

Module Outline

Uploaded by

Bonny runameso
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views8 pages

Module Outline

Uploaded by

Bonny runameso
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

HCSE 224 OBJECT ORIENTED PROGRAMMING

Tutor: Ruvinga Email: [email protected] Contact: +263775936673

Overview

The module equips students with application experience of Object-Oriented (OO) principles
using an Object Oriented Programming (OOP) programming language Java. Students will be
exposed to generic programming concepts, use of packages, input/output (IO) streams and
exception handling techniques.

Prerequisite
Nil

Purpose

Equip students with application experience of Object-Oriented (OO) principles of


inheritance, encapsulation and polymorphism.

Instructional objectives

To learn OO principles
To build, test and debug object oriented solutions.
To master use of collections Application Programming Interface (API) and other generic
programming principles
To implement input and output streams in programs.
To learn how to properly utilize the OOP exception handling mechanism.
To implement sound Graphical User Interface (GUI) and database applications.

Module Outline
Unit 1: INTRODUCTION
Introduction; Writing a Program, Variables, Data Types; Operators; Java control
statements Control Statements

Unit 2: OOP Concepts


Constructors, Inheritance, aggregation, association, method overloading and overriding,
polymorphism, abstract class and methods, encapsulation, Packages and access modifiers

Unit3: CLASSES and LIBRARIES


Built-in Classes; string classes, math class, wrapper classes, system class. Utility classes;
array class, scanner class, date class, calendar class, simple date format class, time/date
API, string tokenizer class.
Unit 4: JAVA FEATURES

1
Lambda expressions, method references, functional interfacse, streams, collectors,
string joiner, arrays paralle sort, List, Set, Map.

Unit 5: EXCEPTION HANDLING & IO and GUI’s


Exception-Handling Fundamentals, multi threading, Java I/, Java serialization, Regex,
AWT, Swing, Enum, Annotations

Unit 6: DATABASES
Java Database Connection (JDBC); architecture, types of drivers, CRUD operations,
prepared statements. GUI and database integration.

Methodologies:
 Lectures,
 Lab – Sessions,
 Group Work,
 Presentations
 Research including Video Tutorials.
TOOLS:
1. PC
2. Java IDE (Eclipse or Netbeans)
3. JDK 8 +
Methodologies.
 Lectures,
 Lab – Sessions,
 Group Work,
 Presentations
 Research including Video Tutorials.
Course Assessment.
Final examination: 60%

Practical work 20%


 LabReport
Course work: 20%
 2 Test,
 2 Assignments

Main Study link


https://beginnersbook.com/

Course Material:
i. Java The Complete Reference Ninth Edition, Herbert Schildt, McGraw-Hill
Education, 2014.
ii. Java 8 in Action: Lambdas, streams, and functional-style programming,
Raoul-Gabriel Urma et al, Manning Publications Co. 2015.
iii. http://www.tutorialspoint.com/java/
iv. http://docs.oracle.com/javase/tutorial/

2
OOP ASSIGNMENT AND TEST SUMMARY

LAB REPORT EXERCISES (REFER TO SAMPLE LAB REPORT TEMPLATE)


 Unit 1 Programs :Due Every week 2 during face to face

1. Hello world program


2. Program to read numbers entered by user
3. Program to read string entered by user
4. Program to check positive and negative numbers
5. Program to add two numbers
6. Program to multiply two numbers
7. Program to find ASCII value of a character
8. Program to calculate area of a rectangle
9. Program to find largest number between to numbers entered by user
10. Program to check even numbers
11. Program to count the number of times the letter appears on your name
12. Program that uses a switch case

 Unit 2 Due To be advised

1. Program that uses the string len() method to count the number of characters in
a string object.
2. Program to concatenate two strings using conct()method
3. Program to add the following numbers into a array {3.5, 1.8, 4.2, 1,4},find the
sum of the numbers and find the largest and smallest number in the array.
4. Program to get current date and time
5. Program of your choice from what you learnt from presentations by group1 or
2

 Unit3 Due To be advised

1. Program to join multiple strings and specify delimiter as *. Hint string joiner class
2. Program to use the parallelSort() method to sort the numbers in the array{1,7,3,9,4}
3. Program for getting the average age of students using averagingInt() method

4. Program of your choice from what you learnt from presentations by group 3
5. Program of your choice from what you learnt from presentations by group 4

3
******Design a small databased application of your choice using Java**************

***************************************************************************
ASSIGNMENT 1Individual, Hand written Due 7 June 2022
Question 1
a) Define the following terms
i. Abstraction [2]
ii. Encapsulation [2]
iii. Inheritance [2]
iv. Polymorphism [2]
b) Draw a flow chart to illustrate the phases of JAVA execution and differentiate JVM
vs JRE vs JDK [6]
b) Provide a detailed description of the JVM Architecture [6]
c) Write a Java program
i. That performs addition, subtraction, multiplication and division using a switch
statement [10]
ii. Print odd numbers between 1 and 50 [10]
***************************************************************************
ASSIGNMENT 2 Presentation in GROUPS [25marks]

PRESENTATION GROUPS

 Maximum 30-40 slides PPT


 4 members in a group
 Presentation Duration maximum 45-50 minutes
 Group leader to submit ppt on google class with cover page containing list of all
group members
 Presentation to begin with group 1 and 2 on 2 March 2022

Unit3: CLASSES and LIBRARIES


Group 1 Due 14 June2022
Built-in Classes; string classes, math class, wrapper classes, system class.
Group 2 Due 21 June 2022

4
Utility classes; array class, scanner class, date class, calendar class, simple date format
class, time/date API, string tokenizer class.

Unit 4: JAVA FEATURES

Group 3 Due 28 June 2022


Lambda expressions, method references, functional interfacse, streams, collectors, string
joiner,
Group 4 Due 5 July 2022
arrays parallel sort, List, Set, Map.

Unit 5: EXCEPTION HANDLING & IO and GUI’s


Group 5 Due 12 July 2022
Exception-Handling Fundamentals, multi threading, Java I/, Java serialization,
Group 6 Due 12 July 2022
Regex, AWT, Swing, Enum, Annotations

Unit 6: DATABASES
Group 7 Due 19 July 2022
Java Database Connection (JDBC); architecture, types of drivers,
Group 8 Due 19 July 2022
CRUD operations, prepared statements. GUI and database integration.

***************************************************************************
TEST 1 - Will cover Unit1 and Unit 2 PROPOSED DATE 28 June 2022 [50 marks]
TEST 2 - Will cover Unit1 and Unit 2 PROPOSED DATE 19 July 2022 [50 marks]
*************************************************************************

5
Sample Past exam paper

MIDLANDS STATE UNIVERSITY

FACULTY OF SCIENCE AND


TECHNOLOGY
DEPARTMENT OF COMPUTER SCIENCE

OBJECT ORIENTED PROGRAMMING


CODE: HCSE224
END OF SEMESTER EXAMINATIONS

MAY 2021

DURATION: 3 Hours

INSTRUCTIONS
1. Answer All questions in Section A and any 3 questions from
Section B
2. Section A carries 40 Marks
3. Each question in Section B carries 20 Marks
4. You are advised to comment your code
5.

6
Section A: Answer all questions [40 marks]

Question 1
d) Define the following terms
i. Abstraction
[2]
ii. Encapsulation
[2]
iii. Inheritance
[2]
iv. Polymorphism
[2]
c) Draw a flow chart to illustrate the phases of JAVA execution and differentiate JVM
vs JRE vs JDK
[6]
e) Provide a detailed description of the JVM Architecture
[6]
f) Write a Java program
iii. That performs addition, subtraction, multiplication and division using a switch
statement
[10]
iv. Check palindrome string using a queue
[10]

Section B: Answer any 3 questions [60 marks]

Question 2
a) Define the terms
i. Wrapper class
[3]
ii. Inner class
[3]
b) With aid of example illustrate auto-boxing and unboxing
[6]
c) Demonstrate how Method-local inner class and Anonymous inner class are
defined and instantiated
[8]

Question 3

7
a) What are generics in Java
[2]
b) Compare a HashSet vs a TreeSet
[8]
c) Write a Java program Sort a HashSet
.
[10]

Question 4
a) State the two types of exceptions.
[2]
b) What is the difference between an error and exception?
[4]
c) Write the general syntax of the Try.. catch block
[4]
d) Write a Java program to demonstrate Kotlin exception handling
[10]

Question 5
a) What is SWING in Java?
[2]
b) Explain the components of JDBC architecture.
[8]
c) Discuss CRUD operations with snippets of code.
[10]

-------------------------End of Exam----------------------------

You might also like