Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In c langhuge I want the full code the full code to play the program please with useing heaps , application in C programming language,

In c langhuge I want the full code the full code to play the program please with useing heaps , application in C programming language, with the following tasks:
Implement the required code to assist the 1st year students to find the shortest path between specific buildings using Dijkstra algorithm by reading the required information from the input_buildings.txt file, the file must initially have the information in the table below, but you can add more buildings and their distances in the file.
\table[[ direction,Masri,Aggad,A.Shaheen,Bamieh,AL.Juraysi,Alsadik,KNH,Sh. Shaheen],[Masri,,,70,39,,,155,78],[Aggad,,,,,71,52,43,],[A.Shaheen,,60,,,89,,,40],[Bamieh,,139,,,,,77,33],[AL.Juraysi,,,,,,,,],[Alsadik,,,,,57,,,],[KNH,,,,,67,,,],[Sh.Shaheen,90,,,120,140,104,,]]
input_buildings.txt: contains for example contains some buildings, but you can add more buildings.
\table[[\table[[Masri#A.Shaheen#70],[A.Shaheen#Aggad#60]]]]
You must fill in the file with all distances between buildings.
Then you can use either contingency matrix or contingency list to represent the graph and store it in your program. The user inserts two buildings, then the application will find the shortest route between them, prints the total distance and the route between the two buildings.
2. Implement the required code to assist the 1st year students in computer engineering to sort the courses they must take using topological sort. The application must load the courses from the input_courses.txt file, where this file will contain the courses listed in the table below:
\table[[Course,Prerequisites],[COMP2310,COMP133],[COMP2421,COMP133],[COMP333,COMP2421],[COMP433,COMP333],[ENCS2340,COMP133],[ENCS2380,ENCS2340],[ENCS3130,COMP133],[ENCS3310,ENCS2380],[ENCS3340,COMP233 and COMP133],[ENCS4320,COMP233 and COMP133]]
input_courses.txt: contains the list of courses and their pre-requisite, below is an example.
COMP2310# COMP133
ENCS3340# COMP233# COMP133
You have to fill in the file with all courses and their pre-requisites .
Upon request, the application sorts the courses using topological sort and saves them internally in the program. So, the user can print them on request.
Your application must have the following menu:
Load the two files.
Calculate the shortest distance between two buildings.
Print the shortest route between two buildings and the total distance.
Sort the courses using the topological sort.
Print the sorted courses.
Exit the application.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions

Question

What is prejudice?

Answered: 1 week ago

Question

To what are Concealment Investigative Methods primarily related?

Answered: 1 week ago

Question

The models used to analyse different national cultures.

Answered: 1 week ago

Question

The nature of the issues associated with expatriate employment.

Answered: 1 week ago