Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have the following problem to be answered in C++ programming: Design a program

ID: 3622579 • Letter: I

Question

I have the following problem to be answered in C++ programming:

Design a program for a trucking company that has 4 trucks in its fleet. Each truck is identified by a number from 1 to 4 and has a maximum weight allowance. Store the data in an array (you may use 2 parallel arrays or a matrix).

Truck Number Max. Weight Limit
1 50000
2 25000
3 20000
4 35000

*Before a truck can begin its route, it must be weighed to see if it falls within its weight limits.
*Ask the user for the truck number and the loaded weight.

I am having problems setting this up as I have not used parallel arrays or a matrix before. I know how to ask a user for input, but I'm really stuck. Any help would be greatly appreciated.

Thanks,
Kat

Explanation / Answer

Dear, Here is the code //header files // use the correct preprocessor directives for input/output #include using namespace std; // function prototypes /* The function instruct describes the use and purpose of the program. */ void instruct() { cout