C++ program

Befejezett Kiadva: 7 évvel ezelőtt Kiszállításkor fizetve
Befejezett Kiszállításkor fizetve

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++ Programozás Linux

Projektazonosító: #13663339

A projektről

8 ajánlat Távolról teljesíthető projekt Utoljára aktív: 7 évvel ezelőtt

Odaítélve:

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 Továbbiak

$20 USD 1 napon belül
(122 értékelés)
6.2

8 szabadúszó tett átlagosan 32$ összegű árajánlatot erre a munkára

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 napon belül
(626 vélemény)
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 Továbbiak

$20 USD 1 napon belül
(236 vélemény)
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 napon belül
(19 vélemény)
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 napon belül
(3 vélemény)
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 napon belül
(0 vélemény)
0.0