Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Class Design: Competition (Suggested Time Spent: (20 minutes) The Competition class Is intended to be an abstract and simplified representation of a drone racing competition.

image text in transcribed
Class Design: Competition (Suggested Time Spent: (20 minutes) The Competition class Is intended to be an abstract and simplified representation of a drone racing competition. Among other things, this object should be able to list the outcome of the competition. Class Properties (MUST be private) drones (Droned) - Array of racing drones. count (int) - number of drone racers in the competition. Class invariants the number of drone racers (count) must always be accurate. Array must be large enough to hold at least 20 drone racers. Class Components Public Getter for count public void add Racer Drone racer) {} public void show Results () {} o Displays a list of the racing drones in order of fastest to complete, followed by dt that did not complete the competition. Include what number competitor the the time completed, and the name. For example: Rank 1. Red Racer (Contestant #3) @ 49.453 seconds Rank 2. Minerva (Contestant #7) @ 51.011 seconds Rank 3. Racing Drone (Contestant #2) @ 67.332 seconds Rank 4. Racing Drone (Contestant #1) - Did not complete Rank 5. Racing Drone (Contestant #4) - Did not complete Rank 6. Smirnoff (Contestant #5) - Did not complete Rank 7. Racing Drone (Contestant #6) - Did not complete Class Design: Competition (Suggested Time Spent: (20 minutes) The Competition class Is intended to be an abstract and simplified representation of a drone racing competition. Among other things, this object should be able to list the outcome of the competition. Class Properties (MUST be private) drones (Droned) - Array of racing drones. count (int) - number of drone racers in the competition. Class invariants the number of drone racers (count) must always be accurate. Array must be large enough to hold at least 20 drone racers. Class Components Public Getter for count public void add Racer Drone racer) {} public void show Results () {} o Displays a list of the racing drones in order of fastest to complete, followed by dt that did not complete the competition. Include what number competitor the the time completed, and the name. For example: Rank 1. Red Racer (Contestant #3) @ 49.453 seconds Rank 2. Minerva (Contestant #7) @ 51.011 seconds Rank 3. Racing Drone (Contestant #2) @ 67.332 seconds Rank 4. Racing Drone (Contestant #1) - Did not complete Rank 5. Racing Drone (Contestant #4) - Did not complete Rank 6. Smirnoff (Contestant #5) - Did not complete Rank 7. Racing Drone (Contestant #6) - Did not complete

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions