C++ program

Ολοκληρωμένο Αναρτήθηκε Πριν 7 χρόνια Πληρώθηκε κατά την παράδοση
Ολοκληρωμένο Πληρώθηκε κατά την παράδοση

Add the following to the Ship class you created earlier:

A static pointer to a Ship which points to a dynamically allocated array of Ship pointers maintaining a list of all ships. The constructor and destructor maintain the list.

A static member variable for the ship count (int)

A static member variable for the current ship list size (int)

Make fleetCapacity a static Ship function. It accepts no arguments, and calculates the capacity of all ships that exist.

Make displayAllShips a static Ship function. It accepts no arguments, and calls the display() member function of each ship in alphabetical order.

The first time the Ship constructor is called, allocate an array of 2 Ship pointers. Add a pointer to the current object to the ship, and update the corresponding static variables to reflect the change.

For all following calls to the Ship constructor, add a pointer to the current ship to the static pointer list. If the list is not long enough, dynamically allocate a new list twice the size as the current one. Copy the pointers from the first list to the new one, and delete the old list. The new Ship must be inserted into the list in alphabetic order by ship name

The destructor removes the current Ship pointer from the list, and shifts all following pointer up one position towards the front. If it is the last Ship being destroyed, then delete the array of ship pointers.

Your main program should define several Ships, then display all ships, define more, then display all ships, then allow some ships to go out of scope, display all ships, etc.

Προγραμματισμός C++ Linux

Ταυτότητα Εργασίας: #13663339

Σχετικά με την εργασία

8 προτάσεις Απομακρυσμένη εργασία Ενεργό Πριν 7 χρόνια

Ανατέθηκε στον:

wangbeizou

Hello. How are you today. I have read and understood the project. I have strong knowledge in Data structures and Algorithms. And I'm expert in Java ,C/C++,C#, Python ,PHP etc. I'm interested this project. So, fi Περισσότερα

$20 USD σε 1 μέρα
(122 Αξιολογήσεις)
6.2

8 freelancers κάνουν προσφορές κατά μέσο όρο $32 για αυτή τη δουλειά

it2051229

Hi there, I would like to do this project if given the opportunity. Let me know if you are interested so I can have further details. Thanks.

$30 USD σε 1 μέρα
(626 Αξιολογήσεις)
7.2
urmate

***************** Solution within 2-4 hours ************************************************************ HI Contact me for an efficient, perfect, well documented development of your project according to 100% accur Περισσότερα

$20 USD σε 1 μέρα
(236 Αξιολογήσεις)
6.6
Nawaz091993

Greetings! I am an expert C++ developer and I excel in completing such college assignments. Have understood the project requirements and would like to start asap. Looking forward to hear from you.

$30 USD σε 1 μέρα
(19 Αξιολογήσεις)
4.4
produo

I am an expert in C++ .. contact me for more details about the project .. i can finish this in no time .. you will like my services

$80 USD σε 1 μέρα
(3 Αξιολογήσεις)
2.6
zeopix

I can give you back the solution in few hours. Text me if you are interested. Check my linkedin profile for more info.

$30 USD σε 1 μέρα
(0 Αξιολογήσεις)
0.0