aking the CREATE call in the main program receives as a parameter the Graph array created at point Define a SHOW procedure/function to print an adjacency matrix, in matrix form Make the SHOW call in the main program, it receives as a parameter the Graph array created in point 2 Define an ADJACENCY procedure/function that receives, apart from the array, two integer values ​​and returns a true value if there is a 1 in those positions of the array and False otherwise. Make the ADYACENCY call in the main program. To do this, ask and validate (between 1 and V) two vertices of the graph. Indicate if these two vertices are adjacent in the graph. That is, if ADYACENCY returns 1, write “Adjacency”, if they are not, say “Not adjacency”. Remember that the user is going to give values ​​between 1 and V and that the matrix has values ​​from 0 to V-1 For the Input degree option, use the function/procedure to add columns and do it with each of the columns. Remember that the user will see vertices between 1 and V and that the matrix has values ​​from 0 to V-1 For the Loops option you can use the same one as ADYACENCY but the same vertex is passed twice as a parameter. The output should be written as (x,x) as seen in the example. Do it with all the vertices. Remember that the user will see vertices between 1 and V and that the matrix has values ​​from 0 to V-1 For the Output degree option, use the function/procedure that adds rows and do it with each of the rows. Remember that the user will see vertices between 1 and V and that the matrix has values ​​from 0 to V-1 The MENU keeps repeating until the user presses 0 (exit)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
In Java language Declare a constant V with value 5 Declare a variable named Graph that is an integer matrix of VxV Define a MENU procedure with the following text GRAPH 1. Create Graph 2.ShowGraph 3. Adjacency between pair 4. Input degree 5.Output degree 6.Loops 0.Exit Validate MENU so that it receives only valid options (from 0 to 6), otherwise send an error message and repeat the reading Make the MENU call in the main program Define a CREATE procedure/function to fill an array with random values ​​between 0 and 1. Where 0 represents no adjacency and 1 indicates there is. Making the CREATE call in the main program receives as a parameter the Graph array created at point Define a SHOW procedure/function to print an adjacency matrix, in matrix form Make the SHOW call in the main program, it receives as a parameter the Graph array created in point 2 Define an ADJACENCY procedure/function that receives, apart from the array, two integer values ​​and returns a true value if there is a 1 in those positions of the array and False otherwise. Make the ADYACENCY call in the main program. To do this, ask and validate (between 1 and V) two vertices of the graph. Indicate if these two vertices are adjacent in the graph. That is, if ADYACENCY returns 1, write “Adjacency”, if they are not, say “Not adjacency”. Remember that the user is going to give values ​​between 1 and V and that the matrix has values ​​from 0 to V-1 For the Input degree option, use the function/procedure to add columns and do it with each of the columns. Remember that the user will see vertices between 1 and V and that the matrix has values ​​from 0 to V-1 For the Loops option you can use the same one as ADYACENCY but the same vertex is passed twice as a parameter. The output should be written as (x,x) as seen in the example. Do it with all the vertices. Remember that the user will see vertices between 1 and V and that the matrix has values ​​from 0 to V-1 For the Output degree option, use the function/procedure that adds rows and do it with each of the rows. Remember that the user will see vertices between 1 and V and that the matrix has values ​​from 0 to V-1 The MENU keeps repeating until the user presses 0 (exit)
Expert Solution
Step 1 Introduction

Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is the powerful general purpose languages.

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Recurrence Relation
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education