Java console application

COSC 314 – Computational Discrete Structures
Final Project – [your name]
70 points – Due December 16, 11:59pm
a) Save this document with your name somewhere in the file name.
b) Paste your code and screenshots into the document where indicated.
c) Submit this document and your .java file to Canvas where you downloaded this
document. Do not submit a zip file but individually attach your files.
You’ve been hired by Credible Connections to write a Java console application
that determines whether a communication network (graph) is connected or not. A
connected network is one in which each node (vertex) in the network is connected
to every other node through one or more links (edges). Each network represents a
simple graph so no parallel edges or self-loops are permitted. Use text file
ConnectionData.txt as input to the application. In Eclipse, place this file within
the project but not within any subfolder. The file contains multiple networks and
each one has the following format:
● First line: the network name.
● Second line: the set of nodes.
● Third line: the set of links. Use an adjacency list or matrix to store the links.
● Subsequent lines: one or more link transactions:
+ indicates a link to be added.
– indicates a link to be removed.
● Last line: END marks the end of the network.
Here is a sample network from the input file:
Comcast
{w, x, y}
{{w, x}, {x, y}, {w, y}}
-{w, x}
-{x, y}
+{x, y}
END
While reading the file, check for the following possible errors:
● In the set of nodes, print an error message and ignore any duplicate nodes.
● In the set of links, print an error message and ignore any links containing an
invalid node (not in the set of nodes).
● Print an error message and ignore any link transactions that would add a parallel
link (the link already exists).
● Print an error message and ignore any link transactions that would remove a link
that doesn’t exist.
For each network read:
● Print the network name.
● Print the set of nodes.
● Print the set of links.
● For each link transaction, print the transaction and then indicate whether the
network is connected or not. Use depth-first or breadth-first graph traversal. If
any node is unvisited, the network is not connected.
● Before any output, print the application title.
● Add a divider line between each network processed.
● After the output, print an application close (for example, “END of Credible
Connections App”.
Follow the styles shown in document Source code styles on Canvas. Insure that
your code has a completed header comment and body comments. Insure that the
work you submit is your own. Plagiarism will earn a zero for the project. Here is
how the application will be graded:
Area
Percent possible
Interface accuracy: does the app have the correct types of
30%
outputs?
Operational accuracy: does the app read and process the input
30%
file correctly? Is the graph traversal correct?
Code readability: does the code have a header comment, body
30%
comments, proper line lengths, spacing, and indentation?
Administrative: have the correct files (.docx and .java) been
10%
submitted?
Total
100%
[your program code here]*
If possible, format your code like this:
Font “Courier New”
Font size “9”
Bold
[your program output here]**
* Copying-and-pasting application code to a Word document
macOS
1) From the program editor window, press command-A and press command-C.
2) From within the Word document, press command-V.
Windows
1) From the program editor window, press CTRL-A and press CTRL-C.
2) From within the Word document, press CTRL-V.
** Copying-and-pasting application output to a Word document
macOS
1) From the Eclipse main screen, maximize the Console window.
2) From the Console window, press shift-command-4-space.
3) From within the Word document, command-V.
Windows
1) From the Eclipse main screen, maximize the Console window.
2) From the Console window, press ALT-PrintScreen.
3) From within the Word document, press CTRL-V.
Comcast
{w, x, y}
{{w, x}, {x, y}, {w, y}}
-{w, x}
-{x, y}
+{x, y}
END
Verizon
{S, T, U, V}
{{T, V}}
+{T, U}
+{S, U}
+{S, T}
+{S, U}
-{T, V}
END
Sprint
{#, %, &, *, !}
{{#, %}, {#, *}, {*, %}, {*, &}}
-{%, *}
+{!, *}
+{#, !}
-{#, %}
+{*, &}
END
FedEx
{Chicago, Detroit, Cleveland, Lansing, Indianapolis, Toledo, Detroit}
{{Detroit, Lansing}, {Lansing, Toledo}, {Toledo, Chicago}, {Lansing, Indianapolis}, {Denver, Cleveland}}
+{Indianapolis, Toledo}
+{Lansing, Detroit}
+{Lansing, Cleveland}
-{Indianapolis, Lansing}
-{Toledo, Lansing}
-{Toledo, Lansing}
+{Lansing, Cleveland}
-{Chicago, Toledo}
END

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER