Ask a question to Desklib · AI bot


Java Classes for Inventory System Development and Implementation

Added on -2019-09-20

Develop and implement Java classes for an inventory system to keep track of mobile devices rented from labs in a college. The project involves building labs from files, issuing rent requests, and calculating the greatest value tag of all devices from a lab. Get solved assignments, essays, dissertations, and more at Desklib.
| 3 pages
| 1548 words

Trusted by 2+ million users,
1000+ happy students everyday

1.GoalsThe goals of these assignments are: (1) develop, and implement Java classes for a business application using specific data structures and algorithms; (2) write code for testing the soundness and completeness of your solution. 2.TasksYour project is to design and develop an inventory system for keeping track of mobile devices rented from labs in a college.We start with the assumptions: (1) labs have unique names and, (2) a lab can stockpile a variable number of mobile devices. Furthermore, a unique name and a value tag (an integer with values between -100 and 100) define a mobile device type. The same device type can be stored in more than one lab.1. A lab receives a rent request for a device and a period of time2. The period is defined by two dates: the request date and the due date.3. If the device is part of lab’s inventory and the device is available, then the device is rented.4. If the device is not part of lab’s inventory or the device is already rented, the request is sent to another lab. If the request cannot be satisfied, then it is dropped.5. There are no data structures such as queues, for keeping track of the requests. However, the inventory system works based on the first-come, first-served principle.A template of the required classes is given to you. Some methods are complete, some are partially implemented and some have only the signature defined. You can find the project template on your online course web page. It is the last course item called Assessments. On the assessment section scroll down for Assignment 2 link. For example, the class MobileDevice has been defined as:class MobileDevice {String deviceName; // the device nameint valueTag; // an integer between -100 and 100Lab lab; // the lab having this device it its inventoryRentSettings rs; // rent settings ... // inner class private class RentSettings {private String rentDate; // date when the item is requested private String dueDate; // date when the item must be returnedprivate boolean borrowed = false; // true if the item is rented ... }}The most important method of MobileDevice class ispublic boolean rentDevice(String rentDate, String dueDate, Lab lab) { ... }The method takes three arguments: two strings dates for the renting period and a lab from where the device is rented. If dates are not valid it creates DateFormatException and returns false. If rentDate > dueDatethrows RentPeriodException and returns false.If no exceptions occur a RentSettings object must be created for the mobile device that is rented.The DateFormatException andRentPeriodExceptionare user-defined exceptions you have to create and they are part of project template. The class Lab has two fields: a lab name and a collection of devices stored in the lab (data structure Vector).public class Lab implements MaxTagValue {

Found this document preview useful?

You are reading a preview
Upload your documents to download
Become a Desklib member to get accesss

Students who viewed this