0% found this document useful (0 votes)
54 views

Programming 732 Assignment 2023

The document provides instructions for a programming assignment involving three questions. Question 1 asks to design a Swing-based Java application for a to-do list manager. Question 2 asks to create a custom chat application using sockets in Java. Question 3 asks to develop a web application that displays data from a MySQL database using servlets and JSP with various features.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Programming 732 Assignment 2023

The document provides instructions for a programming assignment involving three questions. Question 1 asks to design a Swing-based Java application for a to-do list manager. Question 2 asks to create a custom chat application using sockets in Java. Question 3 asks to develop a web application that displays data from a MySQL database using servlets and JSP with various features.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

FACULTY OF INFORMATION TECHNOLOGY

PROGRAMMIG 732 ASSIGNMENT

Name & Surname: _ ICAS / ITS No:

Qualification: Semester: Module Name:

Date Submitted:

ASSESSMENT CRITERIA MARK EXAMINER MODERATOR


ALLOCATION MARKS MARKS

MARKS FOR CONTENT


QUESTION ONE 30
QUESTION TWO 30
QUESTION TWO 30
TOTAL 90
MARKS FOR TECHNICAL ASPECTS
TABLE OF CONTENTS 2
Accurate numbering according to the numbering
in text and page numbers.
CODE 5
Program text indentation
Use of constant, variable and structure names
Comments
REFERENCES 3
According to the Harvard Method
TOTAL 10
TOTAL MARKS FOR ASSIGNMENT 100
Examiner’s Comments:

Moderator’s Comments:

Signature of Examiner: Y. NUBA Signature of Moderator: D. MOYO


Assignment Instructions

1. All assignment must be typed, not handwritten.


2. Every assignment should include the cover page, table of contents and a reference list or
bibliography at the end of the document
3. A minimum of five current sources (references) should be used in all assignments and these
should reflect in both in-text citations as well as the reference list or bibliography
4. In-text citations and a reference list or bibliography must be provided. Use the Harvard Style for
both in-text citations and the reference list or bibliography
5. Assignments submitted without citations and accompanying reference lists will be penalized.
6. Students are not allowed to share assignments with fellow students. Any shared assignments will
attract stiff penalties.
7. The use of, and copying of content from websites such as chegg.com, studocu.com,
transtutors.com, sparknotes.com or any other assignment-assistance websites is strictly
prohibited. This also applies to Wiki sites, blogs and YouTube.
8. Any pictures and diagrams used in the Assignment should be properly labelled and referenced.
9. Correct formatting as indicated on the Cover Page should be followed (font-size 12, font-style
Calibri, line spacing of 1.0 and margins justified).
10. All Assignments must be saved in PDF using the correct naming-convention before uploading on
Moodle. E.g. StudentNumber_CourseCode_Assignment (402999999_WBT512A_Assignment).
11. For each question in the assignment, paste the screenshot of the output. Below this screenshot,
paste all the code for that particular question.
QUESTION 1 (30 MARKS)

Design a Swing-based Java application that allows users to create and manage a
personal to-do list. The application should have a user-friendly graphical user interface
(GUI) with features such as adding new tasks, editing existing tasks, marking tasks as
completed, and deleting tasks. The application should also support saving and loading
the to-do list to/from a file, as well as sorting tasks by due date or priority.

The main window of the application should have a JList component to display the
tasks, along with JTextFields and JButtons for adding, editing, marking as completed,
and deleting tasks. The application should also have a menu bar with options to save
the to-do list to a file in JSON format, load a saved to-do list from a file, and sort the
tasks in the list either by ascending due date or by priority as determined by a user-
defined priority score. The layout and design of the GUI should be user-friendly and
aesthetically pleasing.

Please provide a clear and concise description of the task, including specifications
such as the format of the saved file, the sorting algorithm to be used, and the criteria
for determining task priority.

QUESTION TWO (30 MARKS)

You have been challenged to create a custom chat application that allows two users
to communicate by sending messages to each other using a Socket and ServerSocket
in Java. The application should have the following key features:

• The server must listen on a designated port for connections from clients.
• Once a client connects, the server must establish input and output streams for
the socket and wait for incoming messages.
• The server must print received messages to the console and forward them to
the other connected client.
• The client must connect to the server using the Socket class, set up input and
output streams for the socket, and send messages to the server.
• The client must display messages received from the server on its console.
• The application must be able to handle disconnections and terminate the socket
and streams in a graceful manner.

Note:

• To test the 2 clients, you can run 2 instances of the client program on the same
device using separate terminal windows.
• Your code should have proper error handling and adhere to programming best
practices.
• You can use additional libraries, but make sure to document them.
• Your solution should be original, well-documented, and clearly written.

Can you fulfill this challenge and provide a unique solution for a chat application that
meets these requirements?

QUESTION THREE (30 MARKS)

You have been tasked to develop a web application that displays information from a
MySQL database using servlets and JSP. The application should have the following
functionalities:

1. The web application should have a homepage that displays a list of available
products in a grid view with pagination.
2. When a user clicks on a product, they should be taken to a product details page
that displays additional information about the product such as product images
and related products.
3. The product information should be retrieved from a MySQL database using
JDBC and caching techniques to improve performance.
4. The database should contain three tables - products, categories, and
product_images. The products table should have columns for product_id,
product_name, description, price, and category_id. The categories table should
have columns for category_id and category_name. The product_images table
should have columns for image_id, product_id, and image_url.
5. The product details page should display the product name, description, price,
category name, and all the product images.
6. The web application should have a search functionality that allows users to
search for products by name, category, or price range.
7. The search results page should display a list of products that match the search
query and show the number of results found.
8. The web application should have a form that allows users to add new products
to the database, along with multiple images for each product.
9. You should also implement proper error handling to gracefully handle exceptions
during database operations and form submissions.
10. You can choose to use any server of your choice.

END OF ASSIGNMENT

You might also like