Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please solve this using C programming language the output is very important This semester you are asked to create a country management system. Part 1:
please solve this using C programming language
This semester you are asked to create a country management system. Part 1: C structures to store crucial information 1. C structure to store country information: - In which continent is the country available - Area (km2) - Population - Number of districts available 2. C structure to store district information: - Name of the district - Area (km2) - Population - Number of cities available 3. C structure to store cities information: - Name - Code - Population - Number of buildings - Gross city income - Number of cars - Number of hotels - Number of visitors 4. Create a C structure to store hotel information: - Total number of rooms - Capacity of each room - Number of rooms that are occupied in the hotel - The daily price for renting a room in the hotel - Number of visitors staying in the hotel (must be calculated and not entered by the user, while doing the calculation consider that if the room capacity is 2 for example than 2 persons will be staying in the room not 1 ) - Number of rooms that are still available (must be calculated and not entered by the user) - Total income for the hotel in a month based on the number of rooms occupied 5. Population and Income Calculation: - Implement functions to calculate the total gross income for all cities - Implement functions to calculate the total population for all cities 6. Income per Person: - Calculate and display the income per person for each country 7. Sorting: - Implement a sorting algorithm (e.g., bubble sort) to sort cities based on population, income, or any other relevant characteristic 8. Have menus and sub-menus to: - Add and remove country - Print the current list of countries - Print the information stored in the current countries 9. Error Handling: - Implement error handling in your code for invalid inputs Part 2: Linked Lists 1. Convert the above program to work with linear linked lists the output is very important
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started