Ask Question, Ask an Expert


Ask C/C++ Expert

Home >> C/C++


This assignment models a simplified delivery company. It is composed of the following departments:

i) receiving that contains a list of packages to be delivered,

ii) shipping which ships the packages

iii) accounting which monitors the packages delivered, packages shipped, how they are shipped, where they are delivered to and revenues.

The project simulates 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 revenues and shipments.

Class Design

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

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

1413_Class diagram.jpg

Class Descriptions


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


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 estimated using a lookup table based on the zone the package is to be delivered to.


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


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

Package Class Hierarchy

The package class hierarchy consists of base class Package and two derived classes: StandardPackage and OvernightPackage. Base class contains an ID, addressee name, zone to be mailed to, weight, and a cost parameter. The derived classes find out 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 that is the rate per pound would depend on zone the package is being sent to.

Assignment Requirements

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

Construct cpp file named DeliveryRun.cpp with main() in it. That main would have two statements: one would instantiate a DeliveryCompany object and the other would 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:

• Priority (O = overnight and S = standard)

• Name of customer (no spaces in the customer name)

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

• 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:

• A detailed listing of each package

• A detailed listing of each shipment

• A summary of the shipments - Number of packages

• By transport mode (plane or truck)

• By zone (1, 2, or 3)

• Total - Total revenue

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M92000

Have any Question? 

Related Questions in C/C++

Writing a c code its a beginner level code design a class

Writing a C++ code, its a beginner level code. Design a class house that defines a house on a street. A house has a house number and an (x,y) location, where x and y are numbers between -10 and 10. the key member is plot ...

Write a c program that calculates and prints the average of

Write a C program that calculates and prints the average of two or more salaries entered by the user. The program should first prompt the user to enter the number of salaries to process (make sure: at least 2 salaries mu ...

Design implement test and debug a c program to simulate the

Design, implement, test, and debug a C# program to simulate the rolling of two dice 100 times. Whenever the two dice display the same number, the program should show the roll sequence number (e.g. the 10th roll) and the ...

Programming assignment image processing - pointers class

Programming Assignment: Image Processing - Pointers, Class & Dynamic Data This project is called "Image Processing" which will shrink an input image, convert a color image to gray image , add random noise to an image, ad ...

Intro to programming in c programming assignmentassignment

Intro to Programming in C Programming Assignment Assignment purpose: User defined functions, pointers, Menu driven program A Company needs to create software for their new line of phone applications. Customers will have ...

Discussionobject-oriented design please respond to the

Discussion "Object-Oriented Design" Please respond to the following: • Suppose you were required to write a C++ program that captures and stores data about automobiles that a small dealership in your city sells. Consider ...

Assignmentconsider the following declarationsclass

Assignment Consider the following declarations: class bagType { public: void set(string, double, double, double, double); void print() const; string getStyle() const; double getPrice() const; void get(double, double, dou ...

Bankers algorithmimplement the bankers algorithm for

Banker's Algorithm Implement the Banker's algorithm for deadlock avoidance, that works on a given set of N processes and M resource types (N The input data and result is then displayed on the screen. You may use your pro ...

Assignmentinstructionsthis assignment is to implement your

Assignment Instructions This assignment is to implement your own mini-grocery store in C++. Suppose you have the following Food hierarchy: FOOD FRUIT APPLE BANANA GRAPE DAIRY MILK YOGURT CHEESE (your choice) (three items ...

Write a c program that prompts the user to enter a line of

Write a C program that prompts the user to enter a line of text (up to 50 characters). It should then convert the text entered to uppercase letters and then to lowercase letters, and then to Sentence case. Your program s ...

  • 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

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen