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 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 country1 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 )7/zero<br>City<br>Country<br>ID, Len, Width<br>ID, Len, Width<br>Area ()<br>City *A//array of cities<br>Area ()<br>1. Implement the above system using inheritance in the best possible way. Keep<br>every<br>object<br>size<br>small<br>as possible.<br>Implement all<br>methods<br>as<br>(setter/getter/constructors and destructors) Note that the region area is 0 while<br>the city is len*width and the country is the sum of their cities.<br>2. Create array of countries called Arab of 22 countries. Write a function fill that<br>fills the array 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<br>area<br>5. Write a function that returns array of countries of the same area of Arab<br>6. Write a function that compares between two countries. It returns true if countryl<br>area greater 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 )7/zero City Country ID, Len, Width ID, Len, Width Area () City *A//array of cities Area () 1. Implement the above system using inheritance in the best possible way. Keep every object size small as possible. Implement all methods as (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 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here