Program to create shipping company model, JAVA Programming

This assignment models a simplified delivery company. It is composed of the following departments:  receiving which contains a list of packages to be delivered, shipping which ships the packages accounting which monitors the packages delivered, packages shipped, how they are shipped, where they are delivered to and revenues.

The project simulates the processing of a given set of packages. The packages consist of either standard delivery packages or overnight packages. The vehicles consist of planes and trucks. The accounting department records the revenues and shipments.

Class Design

The application must include the classes in the class diagram below. All data members must be private.

Note: This class diagram does not include all of the methods and data members required to implement this design.

Class Descriptions

DeliveryCompany

The delivery facility consists of Receiving, Accounting and Shipping Departments. It has a function, processPackages(), which processes the packages from Receiving to Shipping and conveys information to accounting.

Receiving

The Receiving Department consists of a list of packages to be delivered. It makes available the information on each package. The transport mode, truck or plane, is determined using a lookup table based on the zone the package is to be delivered to.

Shipping

The Shipping Department ships the packages by creating a shipment object for each package. It assigns a shipping ID to each package.

Accounting

The Accounting Department tabulates the number of packages shipped by zone and mode of transport and the total revenue.  

Package Class Hierarchy

The package class hierarchy consists of the base class Package and two derived classes: StandardPackage and OvernightPackage. The base class contains an ID, addressee name, zone to be mailed to, weight, and a cost parameter. The derived classes calculate costs based on the cost parameter stored in the base class. The overnight package rate is a flat fee as a function of the zone and the standard package rate is a function of the weight and the zone i.e. the rate per pound will depend on the zone the package is being sent to.

Assignment Requirements

Implement the delivery company using the classes specified in the class diagram above.

Construct a cpp file named DeliveryRun.cpp with main() in it. That main will have two statements: one will instantiate a DeliveryCompany object and the other will call the method processPackages() using that object.

The packages to be delivered are contained in ShippingCompanyInput.txt. Each line in the file represents a package and contains the following information:

1.       Priority (O = overnight and S = standard)

2.       Name of customer (no spaces in the customer name)

3.       Zone to be delivered to (1, 2, or 3)

4.       Weight of the package (in pounds)

The charges for each type of package to each zone are included in the Util.h file. The overnight rate is a function of the three delivery zones (OVERNIGHT_RATE). The standard rates are given per pound for each of the delivery zones (STANDARD_RATE_PER_POUND).

The transport mode for each package is a function of the type of package (overnight or standard) and the delivery zone (1, 2, or 3). These are given in OVERNIGHT_MODE and STANDARD_MODE in util.h.

The output must consist of:

1.       A detailed listing of each package

2.       A detailed listing of each shipment

3.       A summary of the shipments

o Number of packages

  1. By transport mode (plane or truck)
  2. By zone (1, 2, or 3)
  3. Total

o Total revenue

Each class with data to be printed out should include its own toString() function. The output can then be generated from the  DeliveryCompany class.

Posted Date: 3/4/2013 7:09:19 AM | Location : United States







Related Discussions:- Program to create shipping company model, Assignment Help, Ask Question on Program to create shipping company model, Get Answer, Expert's Help, Program to create shipping company model Discussions

Write discussion on Program to create shipping company model
Your posts are moderated
Related Questions
how to write java programe and example programe

The basic system has to offer the following options: 1. Exit the program 2. Enter new customer The program prompts for the details of a new customer, assigns a unique cust

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 customerID s)

How can I connect my java application with xampp

We need an OpenGL - based visualisation of an OBJ-File that was created out of Maya3D. (important: we have to use OpenGL with Java - JOGL) In other words: we have an OBJ-file (a

Hi i need help creating a small program that basically asks the user how many numbers hes going to use and then ask for those numbers and see which is the biggest and the smaller

Object diagrams define instances instead of classes. They are useful for illustrating some complicated objects in detail about their recursive relationships.     When

We need a serious programmer who will code Java and Javascript in Liferay - open to bidding Project Description: Big Data project Prototype in Liferay. Big Data + User onl

Each time an object is started in Java it goes into the area of memory named as heap. The primitive variables like double and int are allocated in the stack, if they are local inst

The AOP module is used for developing aspects for our Spring-enabled application. Much of the support has been given by the AOP Alliance in order to ensure the interoperability amo