Coit132229 applied distributed systems assignment

Assignment Help Programming Languages
Reference no: EM132495036

COIT132229 Applied Distributed Systems

Assignment - Java Client/Server Application

Objectives
This assessment item is designed to test your understanding in Java TCP networking, Java Object Serialization/Deserialization, threading, file reading and writing using a client/server application development.

Assessment task
CQU aquatic centre offers swim facility to current students and their families. Entry to the swimming centre is accessible through any of the three automatic doors by keying in a registered student number followed by a 4-digit pin code preferably set to the year of birth. Each entry is charged a flat fee and the time should be persisted to a log file with two fields (student number space separated with entry date and time). Because of the flat fee structure, the entry details can be shared among family members. The system should accommodate both existing users with authentication and provide registration for new users. Administrator role is not relevant and will be discussed in the second assignment. The application should be implemented as a client/server model using java TCP sockets. The client program handles all the data entry and menu selections (1. Current Student 2. New Student 3. Exit). Current student should only be prompted for a student number and a pin code. New student registrations should be prompted to provide relevant details (Student number and a Pin Code). Appropriate error messages (Student exists, Un- Registered Student, Invalid Pin, Welcome or Student Created) should be received from the server after processing and displayed on the client. Student number is alphanumeric but cannot be empty. The client should create an instance of relevant type before sending to the server program for processing and storage. Every 3 minutes the contents from the data structures stored on the server need to be persisted to the text files. The server program should have the capability to concurrently handle multiple client connections (Thread-per-connection). Existing records are to be read and loaded from the provided text files ("studententry.txt" and logentry.txt"). When these text files do not exist, the system should handle this event and create new files.

Coding and Design
You can use the following class descriptions as a guideline for your design.
(At minimum two java files should be used)
Student: This class should implement serializable (Refer to figure 1).
LogEntry: This class should implement serializable and comparable interface to use an inbuilt java Collections.sort() method. (Refer to figure 1).
Example) SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy-HH:mm:ss");
WriteToFile: This class persist all the contents from the data structures to the text files.
TCPClient: This class handles the data entry with suitable menus and interacts with the user. This program creates an instance of (Student /LogEntry / String) on user selection before sending it to the server. Socket,

ObjectInputStream and ObjectOutputStreamfor for TCP Connection should be used. The program should allow the client to enter the details for multiple entries.

TCPServer: This server loads existing records from the text files ("studententry.txt" and "logentries.txt") to appropriate data structures preferably an ArrayList. A timer function should be used to regularly schedule the contents of the ArrayList to be written to the two text files every 3 minutes. The "logentries.txt" should contain entries sorted by the student number. The server program should be running indefinitely ready to communicate with all future clients.

Your program should check user inputs for potential error and allow user to re-enter details where appropriate. The source code should be formatted properly following good programming practice (appropriate variable names, indentation, comments, etc....)

Report
Include an end user instruction and test manual. Run the program and take screenshot of program outputs for all tests with annotations. The test should demonstrate that your TCPServer can accept connections from more than one TCPClient. Provide screenshots of your "studententry.txt" and "logentry.txt".

Attachment:- Applied Distributed Systems.zip

Reference no: EM132495036

Questions Cloud

Find the slope and y-intercept of the regression line : Find the slope and y-intercept of the regression line. What is the equation of the regression line in this problem?
Assignment - Client-Server Synchronization : Concurrent and Parallel Programming Assignment - Client/Server Synchronization, Griffith College Dublin, Ireland. Manage the draw or to save ticket data to file
What is the probability that exactly 3 of those games : If 4 Colonials games are chosen at random, what is the probability that exactly 3 of those games are won by the Colonials?
MGT213 The Project Lifecycle Assignment : MGT213 The Project Lifecycle Assignment help and solution, Southern Institute of Technology - assessment writing service -Define the scope of project management
Coit132229 applied distributed systems assignment : COIT132229 Applied Distributed Systems Assignment help and solution, Java Client/Server Application - assessment writing service
Computing the annual payment : You need to accumulate $108,455 for your son's education. You have decided to place equal year-end deposits in a savings account for the next 15 years.
Evaluate project by using irr decision rule : Suppose your firm is considering investing in a project with the cash flows shown below, that the required rate of return on projects of this risk class is 8 pe
What is the value per share of firm a : Firm B has 6,500 shares of stock outstanding at a price of $25 a share. What is the value per share of Firm A after the acquisition?
What is the stock intrinsic value-grace corporation : Grace Corporation common stock has a par value of $25 and recentlyn paid a dividend of $3.16 per share. The firm's dividends have grown from $1.50 to $3.16

Reviews

Write a Review

Programming Languages Questions & Answers

  What will the following program segments display

What will the following program segments display

  Write a program that will prompt for and read in a list

Write a program that will prompt for and read in a list of up to ten computer store names and the corresponding price that each store charges for a particular model of PC

  Prepare a presentation on backgrounds and fonts

Can you still read the text? Is it too narrow or thick? Is an icon hidden by the background? You should also include tips for choosing backgrounds and fonts.

  Design program to ecode message using caesar cypher

Design a program which decodes messages. Messages will be encoded using Caesar cypher, with each letter being decoded by replacing it with previous letter in alphabet.

  Identify a common task that might occur a regular basis

Programming Fundamentals Paper- Identify a common task that might occur a regular basis. The task should be one that would occur in a business setting.

  Create a project in visual c++ add numberlist.h

Create a project in Visual C++, Add NumberList.h and NumberList.cpp files to your project. These are included in the zip file with this document. The files are code fr..

  Develop a domain-specific language within ruby

Develop a domain-specific language within Ruby, such as for manipulating files in a directory system, editing files, generating quizzes, describing graphical or geographical scenes, and adding and viewing entries in a calendar.

  Implement functions using x86 assembly

Implement a procedure that mimics a logic unit

  What is inheritance and why would we want to use it

What is inheritance and why would we want to use it? When using inheritance, does a subclass inherit both variables and methods of the super class? Justify your answer to part b)

  Grade book program

Grade Book Program

  Create a folder for each region name.

Use the attached page/code to create a template with the changes indicated below. Apply the template to a few pages to demonstrate how it's done. Provide any instructions for applying it that weren't given.

  Create class uses element array of digits to store integers

Create a class HugeInteger which uses a 40-element array of digits to store integers as large as 40 digits each. Provide methods input, output, add and subtract.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd