Assume you have a system with the followoing entities Region ID, Len, Width int Area ()//zero City Country T. ID, Len, Width Area () ID, Len, Width city *A//array of cities Area () 1. Implement the...


Assume you have a system with the followoing entities<br>Region<br>ID, Len, Width<br>int Area ()//zero<br>City<br>Country<br>T.<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 size<br>as small as possible. Implement all methods (setter/getter/constructors and destructors) Note<br>that the region area is 0 while the city is len

Extracted text: Assume you have a system with the followoing entities Region ID, Len, Width int Area ()//zero City Country T. 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 returns 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.

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here