You need to reread the assignment and write the methods to do what the assignmment specifies. For example, the assignment specifies that a carrier's fuel capacity is 125 units. You have the fuel...
Type: Posts; User: GregBrannon
You need to reread the assignment and write the methods to do what the assignmment specifies. For example, the assignment specifies that a carrier's fuel capacity is 125 units. You have the fuel...
Essentially, you got it. Each Ship object reports its fuel state or fuel used through a method called on that object. The statement to get the units of fuel used by ship1 could be something like:
...
Yes, that's what I was referring to, but specifically that the program doesn't report "the number of fuel units that ship has consumed" as required by the assignment. The current code only prints...
How can we see that?
These lines from the assignment description tell you what methods are required and what they do:
And
Your update is on the right track, as long as those four lines are...