Calculate the total cost it will take the loaded truck

Assignment Help Computer Engineering
Reference no: EM131317006

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

Reference no: EM131317006

Questions Cloud

Four-year project to improve its production efficiency : CSM Machine Shop is considering a four-year project to improve its production efficiency. Buying a new machine press for $500,000 is estimated to result in $199,000 in annual pretax cost savings.
Financial leverage effects : FINANCIAL LEVERAGE EFFECTS. The Neal Company wants to estimate next year’s return on equity (ROE) under different financial leverage ratios. Neal’s total capital is $14 million, it currently uses only common equity, it has no future plans to use pref..
Best-case and worst-case scenario analysis : Automatic Transmissions Inc., has the following estimates of its new gear assembly project price = $1, 240 per unit, variable cost = $460 per unit; fixed costs = $4 97 million; quantity = 87.000 units. =Suppose the company believes all of its estimat..
What is amount of the firms EBIT : Advantage First Corporation has sales of $4, 801, 450; income tax of $335, 853; the selling, general and administrative expenses of $263, 434; depreciation of $332, 240; cost of goods sold of $2, 737, 730; and interest expense of $170, 640. What is t..
Calculate the total cost it will take the loaded truck : CS-224: Object Oriented Programming & Design Methodologies - 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 n..
Compare gilgamesh and odysseus as to their heroic qualities : Compare Gilgamesh and Odysseus as to their heroic qualities, noting similarities and differences, using specific examples from the epics.Summarize what this indicates about differences between ancient Mesopotamian and Greek cultures in their ideal..
What are the different segments for the new beetle : What are the different segments for the New Beetle? What are the New Beetle appeals to these segments? Who would you target? How would you position for the segment(s) you want to target?
What is the amount of statelys dividend per share : Stately Building Company's shares are selling for $75 each, and its dividend yield is 2.0 percent. What is the amount of Stately's dividend per share?
Create a data frame that is equivalent to the sas data : Read in Traffic.dat using R and create a data frame that is equivalent to the SAS data set you created during the week.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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