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

  Test a program for summing

You are to implement and test a program for summing 1/x as x runs over all approximately eight million (23 fraction bits) single precision floating point numbers in the interval [1, 2). You are to do this on a server, PC (or Mac) of your choice..

  Write a program that prompts for and reads an amount

Write a program that prompts for and reads an amount (integer) for Canadian dollars and convert the amount to Euros. The exchange rate is 1.

  Create block using a loop to determine number of items

Create a block using a loop that will determine the number of items that can be purchased based on the price of the item and the total amount available to spend.

  Different types of program documentation

List at least three different types of program documentation and the pros and cons of each. When should you use each and can you use only one of them?

  Program to take input five numbers-display mean average

Write the program which takes as input five numbers and outputs mean average and standard deviation of numbers. If numbers are x1, x2 ,x3, x4, and x5, then mean is?

  Write script which outputs xhtml text

Write a script which outputs XHTML text that displays in the XHTML document a rectangle, an oval, an arrow, and a diamond using asterisks (*).

  What''s the relationship between a domain name and a web host

When I was learning HTML, I had a hard time understanding a lot of the terminology. I think this article does a good job of explaining web hosting, domain names and file names. http://support.hostgator.com/articles/hosting-guide/what-is-the-differ..

  How large a value can be stored in an integer variable

Describe a representation for integers that has no size restriction (other than the limits of the computer's available main memory)

  Write the application using the one-dimensional array

Write the application using the one-dimensional array which inputs ten numbers from user, each number can be between and 100, inclusive.

  Design and implement program catches and handles exception

Design and implement a program that creates an exception class called StringTooLongException, designed to be thrown when a string is discovered that has too many characters in it.

  Write a program to prints the sum of all elements with an

write a program to prints the sum of all elements with an even index and all elements with an odd index of the

  User-s ability to navigate the web site correctly

This can paralyze a user's ability to navigate the Web site correctly. Examples include opening new browser windows or using meta-refresh to force a page.

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