Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

In the programming assignments, you are going to develop a simple distributed ticket reservation system (DTRS). This system is used by customers (with unique 6-digit customerIDs) to reserve show tickets with different box offices and manage their reservations.

Assume that a show is identified by a unique showID (like MTL175 or TOR432) the first three characters of which identify the box office (like MTL for Montreal or TOR for Toronto) and the last three digits specify the show (like 175 or 432). The DTRS will run multiple servers, one per box office, maintaining the number of tickets available for each of the shows in that box office in main memory and the list of (customerID, numberOfTickets) for the already reserved tickets for each of the shows in that box office in a file (one file per show).

Customers may invoke the following operations on the box office servers through their client program:

reserve(customerID, showID, numberOfTickets): Reserve the required number of tickets (numberOfTickets) for the specified show (showID) for the customer (customerID).

cancel(customerID, showID, numberOfTickets): Cancel the specified number of tickets (numberOfTickets) for the show (showID) that the customer (customerID) had already reserved. The number of tickets cancelled may be smaller than or equal to the number of tickets reserved.

check(showID): Returns the number of tickets currently available for the specified show (showID).

Thus, this application has BoxOfficeServers (one per box office) implementing the above operations for the box offices and CustomerClients (one per customer, invoking the customer operations at the BoxOfficeServer managing the show on which the operation is to be done) on behalf of the customers as necessary. Thus, each BoxOfficeServer manages the shows within that box office and performs client operations on these shows; and a CustomerClient invokes a client operation at that BoxOfficeServer managing the show indicated in the operation. When a BoxOfficeServer is started, it registers its address and related/necessary information with a central repository. For each customer operation, the CustomerClient finds the required information about the BoxOfficeServer (based on the showID) from the central repository and invokes the corresponding operation.

Write the Java RMI interface definition for the BoxOfficeServer with the specified operations.

Implement the BoxOfficeServer.

Design and implement a CustomerClient which invokes the server to test the correct operation of the DTRS involving multiple BoxOfficeServers (each with a few shows) and multiple customerClients.

You should design a server that maximizes concurrency. In other words, use proper synchronization that allows multiple customers reserve/manage for the same or different shows at the same time.

Java, Programming

  • Category:- Java
  • Reference No.:- M9528978

Have any Question?


Related Questions in Java

Assignment - java program using array of objectsobjectives

Assignment - JAVA Program using array of objects Objectives - This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details - For this assignment, you are required to develop a Menu ...

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Assignment - method in our madnessthe emphasis for this

Assignment - "Method in our Madness" The emphasis for this assignment is methods with parameters. In preparation for this assignment, create a folder called Assign_3 for the DrJava projects for the assignment. A Cityscap ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As