Ask Question, Ask an Expert

+1-415-315-9853

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

Assignmentgoals developing problem-solving skills declaring

Assignment Goals: Developing problem-solving skills, declaring variables, multi-way branches, data validation. Problem: Complete Programming Challenge 4.19 in your text book. Do not accept values larger than 10 meters or ...

Programming assignment 5write a c program that allows the

PROGRAMMING ASSIGNMENT #5 Write a C program that allows the user to make some banking transactions. The program should first prompt the user to enter the current balance of his/her bank account (in dollars and cents, not ...

Transaction processing system tpsxyz electronics is one of

Transaction Processing System (TPS) XYZ Electronics is one of the most popular electronics companies In Sultanate of Oman the company offers affordable electronic gadgets such as mp3 players, portable movie players, mobi ...

Cs 2410workshop make-up assignmentwrite a c program that

CS 2410 Workshop Make-Up Assignment Write a C++ program that will output to a file called output.txt EVERY 10 digit phone number from 713-000-0000 through 713-000-0998. These numbers MUST only contain an odd number of ev ...

Projectdecision statementsdirections read carefully and

Project: Decision Statements Directions (Read CAREFULLY and follow COMPLETELY): - Create the following programs in C++ that perform the purpose described and show the sample output (with user input where applicable). - I ...

C projectphase 11- you need to take input from user study

C project Phase 1 1- You need to take input from user study year (proper value check from 1 to 4) 2- Take input semester (proper value check 1 to 8) 3- Calculate GPA (use Loop, calculate GPA for semester 1,2,3...) Exampl ...

Cosci 21a programming assignmentpurpose experience with

COSCI 21a, Programming Assignment Purpose: Experience with some basic data structures, including circular queues, linked lists, hash tables, and specifically with pointers and the associated dynamic memory allocation. Pr ...

1 we know that from ece 109 to calculate the

1. We know that from ECE 109, to calculate the equivalent resistance of a network of resistors in series in parallel are given by: Write a C++ program that asks the user to input values for resistors (as many as they wou ...

Assignment a random mazewrite a new c program with the

Assignment (a) Random Maze Write a new C++ program with the following functionality: The program writes a greeting on the screen. Then the program displays a maze of ASCII symbols on the screen. The maze consists of 8 ro ...

C-programmingcreate a c program that sorts a sequence of

C-Programming Create a C program that sorts a sequence of positive numbers using the bubble sort algorithm in an increasing or decreasing order based on the user's choice. The pseudo code for the bubble sort algorithm is ...

  • 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