Program to create shipping company model, JAVA Programming

Assignment Help:

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.


Related Discussions:- Program to create shipping company model

Explain about java sdk, Java SDK is not so comfortable with people used to ...

Java SDK is not so comfortable with people used to command line interpreter. IDEs contain compilers, editors, debugging facilities, drag and drop methods, etc. This compiler strive

Train ticket, Write a program that manages a list of train tickets, JAVA Pr...

Write a program that manages a list of train tickets, JAVA Programming

Conditional Execute, Write a program that prompts for two people’s birthday...

Write a program that prompts for two people’s birthdays (month and day), along with today’s month and day. The program should figure out how many days remain until each user’s birt

HOW TO MAKE A TRANSCRIPT, Write a java program that computes the scores of ...

Write a java program that computes the scores of 10 students in the following units; 1.Java 2.PHP 3.Python 4.C++ 5.Perl Generate a transcript.

Write a recursive function, 1) Write a function that uses recursion that co...

1) Write a function that uses recursion that converts a decimal number to octal (base 8). The function should accept a single integer and return a String containing the base 8 equi

How instant messaging works explain their process, How instant messaging wo...

How instant messaging works? Write the steps involved in this process? The Instant Messaging services available permit us to manage a list of people (contacts) that we interact

Idea for a project, I want to get some idea about how i can make a project ...

I want to get some idea about how i can make a project on "Free Lancer Teaching."

Explain operator precedence in java, Explain operator precedence in java ? ...

Explain operator precedence in java ? It's probable to combine multiple arithmetic expressions in one statement. For example the subsequent line adds the numbers one by five:

Develop the back end of a calculator application, For this assignment, you ...

For this assignment, you will develop the back end of a calculator application. The GUI (graphical user interface) has been provided by your instructor. The application will requir

Write Your Message!

Captcha
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