ITECH2309 Assignment 2: Paired Software Development - Animal Clinic

Verified

Added on  2022/10/09

|5
|565
|13
Practical Assignment
AI Summary
This document presents a solution for a software engineering assignment (ITECH2309) focused on the design and implementation of a graphical user interface (GUI) for an animal clinic appointment system. The solution details the design of the `MainGIU1.java` class using Java Swing, including the fields for animal, veterinarian, appointment type, resources, date, and time, along with save, cancel, and quit buttons. The steps taken in the development, including creating the class, adding GUI components, and implementing action listeners, are outlined. The design adheres to object-oriented principles such as encapsulation, the open-closed principle, single responsibility, dependency injection, and interface segregation. The document also includes class diagrams and test information, including error debugging, compilation, and integration tests. This assignment emphasizes Agile development, SOLID design principles, and paired programming within the context of a real-world application.
Document Page
{Cover Page Here}
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Table of Contents
Design Name....................................................................................................................................2
Description.......................................................................................................................................2
Steps Taken......................................................................................................................................2
Design Principle Followed...............................................................................................................2
Class Diagram..................................................................................................................................3
Test Information...............................................................................................................................3
Test................................................................................................................................................3
Results...........................................................................................................................................3
Document Page
Design Name
MainGIU1.java
Description
This is the class which was designed and developed using java swing where all appointments for
clinic are secured. The class has the following fields; Selection of the animal, selection of the
veterinary, selection of the appointment type, specifying the assistance resources, field for
appointment date and field for entering the appointment time. On the same screen, the class have
three buttons namely, save, cancel and quit button. In the save button, the details which have
been entered are save d in the appointment book using the button when it is clicked. In the cancel
button, the entries which were entered by the user will be cleared when the cancel button is
clicked. In the Quit button, the whole screen will be closed when the quit button is clicked. In all
these buttons, the message, pops out prompting on the action which is yet to be performed.
Steps Taken
In designing and development of this class, the following were the steps taken.
i. Creating new class named MainGIU1.
ii. Adding the startGUI code which contain the information regarding the frame of the
gui.
iii. Adding the implements ActionListener to the public class,
iv. Initializing the Jframe, Jpanels and the Jbuttons.
v. Creating the top panel method which contains the information of the company, logo
and the help center.
vi. Creating the MainPanel method which contains the main fields and corresponding
labels. In this fields, its where the user enters the information to be captured for
appointment.
vii. Creating the bottom panel which is used to contain the buttons for save, cancel and
quit as described in the description above.
viii. Finally creating the actionPerformed(ActionEvent e) void public method which is the
center of all operations in the class. This is where the code is being executed for
action.
Document Page
Design Principle Followed
This java is an object oriented programming language, the design of this particular class has the
following principles;
a. Encapsulation: Codes performing similar tasks was encapsulated so that change can be
easily done in future.
b. Open Closed design for functionalities where the class is open for extensions and creation
of new functionalities and closed for modifications
c. Single responsibility principle whereby the class designed only has one responsibility and
that is for booking appointments.
d. Dependency injection and inversion principle where some libraries were imported to help
in the overall development of the class graphical User Interface.
e. Interface Segregation Principle. The interface designed is for only appointment booking
and no any other interface designed for that purpose.
Class Diagram
Test Information
The class functionality was testing if it is executing without error and abnormalities. And the
below are the results;
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Test
The program was executed and tested if the class designed is able to open without errors, free
from bugs, is able to compile and integrate with other classes when called and the below is the
test.
Results
Class Name Error Debugging Compilation Integration
MianGUI.java No Successful Yes Yes
chevron_up_icon
1 out of 5
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]