Module: Computer Programming with Java
Module Code: MT103
Module Leader:
Level: 1
Semester: 2
Credits: 20
Introduction and Rationale:
Students doing this module will learn how to program using either Java, C#, .Net or Objective C, or
C++. Based on the OS vendor or development environment of interest to the students, the module
will ground the students in understanding the key concepts that will later allow then to develop
applications for the environment using a an appropriate target language. This will start from
understanding the language basics such as syntax, logic control, data maintenance, user interaction
and testing/deployment.
Students would then develop robust and secure applications, using the Object Oriented concepts
and principles, explore the API features of the language to enhance the capability of the Application.
Applications developed must also store persistent data through files.
Pre-requisites: None
Aims:
-To teach students how to write computer programs.
Learning Outcomes:
Students should be able to:
- Understand language environmental set up
- Understand the language syntactic elements and its building blocks
- Implement proper program logic control, data maintenance and user interactions
- Write programs using the language to solve basic computing problems
- Test and deploy a working program
Indicative Content:
Language Fundamentals, Methods /Subroutines, logic control structures, data structures, Basic input
and Graphics, Objects and Classes, Building a User driven Application, Testing and Debugging
Learning and Teaching Methods:
The module uses a combination of lectures and laboratory (lab) sessions and seminars. Each lab
session gives a practical application of concepts learned in class and further provides opportunities
for students to gain experience using recommended industry tools/IDEs.
Assessment
Assessment consists an assignment, Assessment Exam, and Final exam.
Course work = assignment & Assessment Exam, 60:40
Final mark = Exam & Coursework, 60: 40
Key Text: Starting Out with Java 5: Control Structures to Objects, Tony Gaddis
ISBN: 1-57676-171-1
Syllabi and content
Weekending LECTURE/SESSION TUTORIAL
Session 1
Introduction to Java
What is Java? Lab 1
History of Java
Versions of Java
Java features and benefits
Session 2 Variables & Data types in Java Lab 2
• Primitive Data types in Java
• Naming & declaring variables or identifiers.
• Variable initialisation.
Session 3 Control structures
Java Expressions & Arithmetic Operators.
Java Logic operators & conditional operators. Lab3
Java control structures
Ø sequence
Ø The If Statement
Ø The Switch(case) statement
Ø Iterations Loops (For loop, Do-while loop,
while loop)
• Nesting.
Session 4 Methods in Java
• Method structure
• Method Scope
• Calling Methods
• Arguments and Parameters
• Method overloading
Session 5 Introduction to Object oriented programming. Lab 4
• Introduction to classes and Objects
• Encapsulation and Abstraction
• Messages and operations
• Creating an objects
• Assessing object Data
Session 6 Class Members Lab 4
Static and non-static members
Constructors
Accessors and mutators
The this keyword
Member scope
Session 7 Array Processing
• Declaring an Array
• Array index
Lab5
• Array initialisation
• Processing and Array
• Calling and Passing an Array
• Passing Arrays to Methods
• Using Array length
Session 8 Arrays of Objects
• Declaring an Array of Objects
• Initialising Object Arrays in Java
• Array index(Subscript)
• Calling and Passing an Array
• Passing Arrays to Methods
Session 9 Inheritance and Class Hierarchies Lab 5
• A Superclass and A subclass
• Inheritance in Java
• The Object Class
• Initialising Data fields in a subclass and the No-
Parameter constructor
• Protected visibility for superclass data fields
• Final Members: A way for Preventing Overriding of
Members in Subclasses
• Final Classes: A way for Preventing Classes being
extended
• Abstract classes
• Method overriding and method overloading.
• Casting in a class hierarchy
Session 10 Interfaces Lab 6
• Interface definition
• Implementing interfaces
• Extending interfaces
• Inheritance and interface implementation
Session 11 Exception Handling and Debugging Java Programs Lab 7
• Handling Exception
• Try Catch Block and Multi Catch
• Finally Block
Session 12 Files, Strings and Collection Classes Lab 8
GUI Programming??
Reading Week
Final Examinations