CECS 328-Fall 2024-Programming Assignment 3
CECS 328-Fall 2024-Programming Assignment 3
Cargo Airline
CECS 328 – Fall 2024
Points Possible: 10
Problem Statement:
You are a software engineer for a cargo airline company. You want to develop a program that, based on
the pool of possible cargo and weight capacity of the aircraft, you want to output the maximum revenue
that the aircraft can generate.
Call your function aircraft_max_revenue. Note that the function name is case sensitive and you will get
points deducted if your function name doesn’t exactly match the function name mentioned in this
document.
Submission Requirements:
Failure to follow any of the requirements in this document (items listed below or above) will result in
point deductions, up to and including receiving zero credit.
Examples:
Below are some examples for your reference. Note that your program will be graded against additional
test scenarios, not just based on the examples below.
The below are run from the Python command line (aka console). This is how your code will be graded.
Your program absolutely needs to be able to be run from the command line, otherwise you will get zero
credit.
Within the command prompt or Terminal, cd into the directory containing your cecs328pa3.py file.
Assuming you have installed Python, in your command prompt or terminal, type python or python3 and
press Enter to enter the Python console. The red text below is from the Python console. The black text
are my comments regarding the example above it.
>python
Python 3.12.1 (tags/v3.12.1:2305ca5, Dec 7 2023, 22:03:25) [MSC v.1937 64 bit (AMD64)] on win32
>>> aircraft_max_revenue([(3,32),(5,22),(4,15)],8)
54
>>>
aircraft_max_revenue([(787,332),(1620,14624),(1204,11673),(147,15671),(423,18752),(1824,2418),(121
8,6800),(9,685),(1753,5432),(52,17628),(1031,9352),(2,11034),(1296,971),(961,1354),(602,11689)],1000
0)
125758
>>>
aircraft_max_revenue([(787,332),(1620,14624),(1204,11673),(147,15671),(423,18752),(1824,2418),(121
8,6800),(9,685),(1753,5432),(52,17628),(1031,9352),(2,11034),(1296,971),(961,1354),(602,11689)],5000
)
103284
>>>
aircraft_max_revenue([(787,332),(1620,14624),(1204,11673),(147,15671),(423,18752),(1824,2418),(121
8,6800),(9,685),(1753,5432),(52,17628),(1031,9352),(2,11034),(1296,971),(961,1354),(602,11689)],100)
29347
>>>
aircraft_max_revenue([(787,332),(1620,14624),(1204,11673),(147,15671),(423,18752),(1824,2418),(121
8,6800),(9,685),(1753,5432),(52,17628),(1031,9352),(2,11034),(1296,971),(961,1354),(602,11689)],10)
11034
>>>
aircraft_max_revenue([(787,332),(1620,14624),(1204,11673),(147,15671),(423,18752),(1824,2418),(121
8,6800),(9,685),(1753,5432),(52,17628),(1031,9352),(2,11034),(1296,971),(961,1354),(602,11689)],1)
What to Submit:
Grading Guidelines: