Starting from:

$30

BBM104-Programming Assignment 1 Solved

In this experiment, you are supposed to develop a simple Journal System program. The main aim of the experiment is to develop your skill of using Class, Object, Constructor, Getter/Setter, and Encapsulation with Java programming language.

1           General Information
In this section you can find some useful beginner’s level information that you will need for this project. For more information on each subject you need to do additional research and consult other resources (e.g. lecture notes, textbook, Internet resources, etc.).

Object-oriented programming (OOP) is more than just adding a few new features to programming languages. It is rather a new way of thinking about decomposing and modeling problems with less complexity and more code reuse when developing programming solutions. In OOP, a program is viewed as a collection of loosely connected objects, each of which is responsible for specific tasks. It is through the interaction of these objects that computation proceeds and the model works as a whole.

In this assignment, you will work with the concepts of OOP in order to practice them and observe their advantages. With this assignment, you will learn the concepts of relationships among classes, encapsulation.

1.1         Encapsulation
Encapsulation is one of the fundamental OOP concepts. It is a technique of wrapping (packaging) the related data (attributes) and behavior (code - methods) together into a single unit. It also provides a way to hide and control data by protecting it from misuse by the outside world. This is achieved by making data members private, and using public helper methods through which we can decide the level of access we want to provide (e.g. read-only, write-only). A fully encapsulated Java class is a class whose all variables are private.

The advantages of encapsulation include: flexibility in modifying code in case requirements change, reusability of encapsulated code throughout multiple applications if necessary, and reducing the time of maintenance (update) process.

2.1.1        Visibility Modifiers

In Java, there are four access modifiers which provide various access levels: private (visible inside of the class only), default/package (visible inside of the package), protected (visible inside the package and to all subclasses) and public (visible to everyone).

2           Problem
You will write a Journal System application. You will use the given corpus in order to list articles which belong to Authors. Also you will complete Authors’ articles by using article file.

General Rules:

•    An author has maximum 5 articles.

•    An article id’s first 3 characters equal to an author id.

 

Your program should read the following three files: article file, author file and command file. Java provides a rich API for input/output (I/O) operations. In this experiment you will use I/O (Input/Output) classes of Java to perform file operations.

More products