1. Implement the above system using inheritance in the best possible way. Keep every object size as small as possible. Implement all methods (setter/getter/constructors and destructors) Note that the...


1. Implement the above system using inheritance in the best possible way. Keep every object size as small as possible. Implement all methods (setter/getter/constructors and destructors) Note that the region area is 0 while the city is len*width and the country is the sum of their cities. 2. Create array of countries called Arab of 22 countries, Write a function fill that fills the arrav Arab 3. Write a method that finds the city that has the max area in a country 4. Write a method that sorts the cities in a country from the largest to the smallest area 5. Write a function that retums array of countries of the same area of Arab 6. Write a function that compares between two countries. It returns true if countryl area greater than country2 area. 7. Write a function to move a city from one country to another.


Assume you have a system with the followoing entities<br>Region<br>ID, Len, Width<br>int Area ()//zero<br>City<br>Country<br>ID, Len, Width<br>Area ()<br>ID, Len, Width<br>City *A//array of cities<br>Area ()<br>1. Implement the above system using inheritance in the best possible way. Keep every object<br>size as small as possible. Implement all methods (setter/getter/constructors and destructors)<br>Note that the region area is 0 while the city is len*width and the country is the sum of their<br>cities.<br>2. Create array of countries called Arab of 22 countries. Write a function fill that fills the array<br>Arab<br>3. Write a method that finds the city that has the max area in a country<br>4. Write a method that sorts the cities in a country from the largest to the smallest area<br>5. Write a function that retums array of countries of the same area of Arab<br>6. Write a function that compares between two countries. It retuns true if countryl area greater<br>than country2 area.<br>7. Write a function to move a city from one country to another.<br>

Extracted text: Assume you have a system with the followoing entities Region ID, Len, Width int Area ()//zero City Country ID, Len, Width Area () ID, Len, Width City *A//array of cities Area () 1. Implement the above system using inheritance in the best possible way. Keep every object size as small as possible. Implement all methods (setter/getter/constructors and destructors) Note that the region area is 0 while the city is len*width and the country is the sum of their cities. 2. Create array of countries called Arab of 22 countries. Write a function fill that fills the array Arab 3. Write a method that finds the city that has the max area in a country 4. Write a method that sorts the cities in a country from the largest to the smallest area 5. Write a function that retums array of countries of the same area of Arab 6. Write a function that compares between two countries. It retuns true if countryl area greater than country2 area. 7. Write a function to move a city from one country to another.
Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here