Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

Overview

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

DeliveryCompany

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

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

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

Accounting

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++

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

  • 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