Creating a package delivery system

Assignment Help Programming Languages
Reference no: EM131243654

Object Oriented Programming & Design Methodologies Assignment

For this assignment, you will be  creating a package delivery system. You need to think in terms of objects. The first object is the delivery truck that can store 50 liters of petrol. The cost per liter of petrol is 2.73$. You will be using the sample file, Drivers.txt for this assignment. Your code should however take into account that if an entry is increased or reduced (5 lines per entry) it reads all the entries in the file.

For example, if there is just one entry, it should give the following lines as output:

Elton John

34

218

9

7

Based on this entry, the driver's name is Elton John, his truck has 34 liters already, his total funds are 218$. His truck covers 9 km per liter if empty and 7 km per liter when loaded.

The trucks can carry 12 to 20 packages with random dimensions. The length, width and height of every package can range from 5 to 30 inches. This means that you will need to declare a dynamic array of boxes for each truck and every box will have a different dimension.

Calculate the total cost it will take the loaded truck to travel 60 km, drop the cargo and return empty based on the fuel consumption when the tank was full. This means that the drivers need to fill the tank first before making the journey. Based on the amount of money they have, calculate if everyone can do the journey. This means that you will need to declare a dynamic array of Trucks as well.

The sample code given is in structures, convert that to CLASSES.  Keep in mind that the attributes/variables MUST be private.

When unloading the boxes show the volume of all the boxes and then deallocate the array of boxes.

Once the trucks return, deallocate the array of all trucks after calculating the cost for the trip.

Bonus Work (If done properly, one of your previous assignments will get full marks)

The packages can only be loaded in descending order of volume, which means that the largest package will go in first. The packages can only be unloaded in ascending order of volume that is, the smallest package first. The output should be given in terms of package number, not volume. Only attempt this if you have extra time and need the bonus marks. (HINT: You need not use one array only for this). Global variables or vectors are not allowed.

Attachment:- Assignment.zip

Reference no: EM131243654

Questions Cloud

Justify your suggestion to update to star topology : 2-3 pages, APA citation, Your company is in the process of upgrading the network infrastructure, which involves moving from a 10BaseT to 100BaseT network. Currently, they use Bus topology in the network. As a member of the data network team, you a..
What might justin himself have done to enhance likelihood : What might Justin himself have done to enhance the likelihood of success in his new assignment and to help avoid derailing an otherwise highly promising career in Compcorp?
Complexity of performing operations on arrays : Discuss how the complexity of performing operations on arrays goes up when moving from one-dimensional to (square) two-dimensional arrays (linear to quadratic complexity).
What is the overall significance of the regression : Interpret the preceding regression taking into account any prior expectations that you may have about the signs of the various coefficients.
Creating a package delivery system : CS-224: Object Oriented Programming & Design Methodologies Assignment. For this assignment, you will be  creating a package delivery system. You need to think in terms of objects. The first object is the delivery truck that can store 50 liters of p..
Calculate var under the black scholes model : By equating this to the price of an ATMF straddle under the normal model with standard deviation ψ, find an equivalence between σ and ψ.
What is the income elasticity of demand for cigarettes : What is the elasticity of demand for cigarettes with respect to price? Is it statistically significant? If so, is it statistically different from one?
Next caper somewhere on pennsylvania avenue : Holy digits Batman! The Riddler is planning his next caper somewhere on Pennsylvania Avenue. In his usual sporting fashion, he has left the address in the form of a puzzle. The address on Pennsylvania is a four-digit number where:
Should the interest rate variable be retained in the model : See if the Cobb-Douglas production function fits the data given in the table and interpret the results. What general conclusion do you draw?

Reviews

Write a Review

Programming Languages Questions & Answers

  Based on the keston 2013 article in the electronic reserve

write a 200- to 300-word short-answer response to the followingbased on the keston 2013 article in the electronic

  Program to compute net pay of employee

A program to compute net pay of employee. It must permit one to read deposit number, account name, amount deposited, and yesr.check.

  Write function to take the name of file as one parameter

Write a function named paragraphStats() that takes one parameter:the name of a file. The file contains a single line of text.

  How you take care of these missed values

For the assignment, assume that the sensed data are be generated randomly either by a random number generator in your program or read a triplet every time from a file which is pre@generated).

  Evaluates and prints the value of the polynomial

Write a program that evaluates and prints the value of the polynomial ax2 + bx + c, given user inputs for a, b, c, and x using integers and floats.

  Write a bash shell script prompt user to enter first name

Write a Bash shell script named phone.bsh that prompts the user the to enter first or last or any portion of person's name, so that can be found the appropriate entry in the phone directory file.

  Explain what can go wrong in resource management on c++

Explain What can go wrong in resource management on c++?

  What is the output of the statement

Given the subsequent array declaration, if the array is stored starting at address 2500, what is the output of the following statement?

  The process of identifying the classes or functions

How the two programs were selected and The process of identifying the classes or functions for replacement

  Write a program that calculates a cars gas mileage

Write a program that calculates a car's gas mileage - The program should ask the user to enter the number of gallons of gas the car hold and the number of miles it can be driven on a full tank.

  Draw a line joining the first two points

Write a program that allows the user to specify a triangle with three mouse presses - Draw a line joining the first two points. After the third mouse press, draw the entire triangle.

  Write a simple sorting program

Binary Record Sorting in Ascending Order| You will write a simple sorting program. This program should be invoked as follows: shell% ./fastsort -i inputfile -o outputfile

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