i.A class called Vertex that has the following: i. A private member called "value" of type char
ii. A default public constructor which sets value to NULL.
iii. Another public constructor that takes a character c as input and sets value to c.
iv. A public function "void printVertex( )" that just prints the character (value).
II.A class called Edge that has the following:
i. A private variable called "weight" of type int.
ii. Two private variables called "start" and "end", each of type Vertex.
iii. A default public constructor that sets "start" and "end" to a vertex created using its default constructor.
iv. Another public constructor that takes two vertices "s" "e" and another int "w" as input that sets "start" to "s", "end" to "e" and weight to "w".
v. A public function called "void printEdge( )" that calls start's printVertex( ), end's printVertex( ) functions and also prints the edge's weight.
III.Another class called "Graph" with the following data and functions:
i. A private variable called "count" of type int that keeps track of the number of edges.
ii. Another private variable called "allEdges" that is an array of edges (Edge[MAXNUM], where MAXNUM is some predefined number).
iii. A default public constructor that sets count to 0.
iv. A public function called "void addEdge(Edge e)" that adds an edge "e" to the graph. It should simply add e to the array of edges of the graph (allEdges) and increment count.
v. A public function called "printGraph( )" that prints all the edges by calling "printEdge( )" of each edge of the graph.
IV. In the main function do the following:
i. Create at least 6 vertices.
ii. Using the vertices, create at least 5 edges.
iii. Define a graph using its default constructor.
iv. And add each of the edges to the graph.
v. Call the printGraph( ) function of the graph.
2. Define an array of integers of at least 10 elements. initialize it with any meaningful values. Without sorting the array in any way, find the third largest element of the array.
These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.#include "Vertex.h"
using namespace std;
cout << value;
By purchasing this solution you'll be able to access the following files: