Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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:- Program.rar

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92071613

Have any Question?


Related Questions in Computer Engineering

Is there someone to help me on to write c codea write a

Is there someone to help me on to write c++ code? A) Write a snippet of code to declare ( what would go into the .h file) and then implement(what go into the .cpp file) an exception class called PetBitesException which h ...

Can someone help me with the following java question

Can someone help me with the following java question please (a) Implement a recursive search function in Java int terSearch(int arr[], int l, int r, int x) that returns location of x in a given sorted array arr[l...r] is ...

Carbonated drinks like cola tonic water and club soda are

Carbonated drinks like cola, tonic water and club soda are pleasantly bubbly due to the following decomposition of carbonic acid: H2CO3(aq) → H2O(l) + CO2(g) If a sample of H2CO3 decomposes over water at 50°C, 0.23 L of ...

What is the broadcast domain and ports for hubs and

What is the Broadcast Domain and Ports for hubs and bridges?

A compute the sumnbsps1nbsp 1 2 3 nbsp nbsp 9999 the sum

(a) Compute the sum S1 = 1 + 2 + 3 + . . . + 9999 (the sum of all integers from 1 to 9999). Do not use a program. (b) Compute the sum S2 = 1+3+5+...+9999 (the sum of all odd integers from 1 to 9999). Do not use a program ...

The contracts manager at a company needs to make a large

The contracts manager at a company needs to make a large legal document available to an overseas customer. However, she has some challenges: The document contains sensitive information; it is too large to send via e-mail ...

What is an example of a repetitive and specific task in

What is an example of a repetitive and specific task in which you use descriptive statistics on a daily basis. What is an example of how you consciously or subconsciously rely on the presence of descriptive statistics in ...

How does westpac manage foreign exchange risk how does it

How does Westpac manage foreign exchange risk? How does it differ to the other 4 big banks? (ANZ, CBA and NAB)

Question whats the roles of user roles and why are they

Question : What's the roles of user roles and why are they necessary for Linux? How are these roles and permission similar and different from other types of users and other operating systems?

Study the information given below and answer the

Study the information given below, and answer the questions. For a long time, the Royal Victoria Hospital (RVH) worked with an information system that consisted of a mix of paper-based files and small independent databas ...

  • 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