Determine spanning tree configuration for active data

Assignment Help JAVA Programming
Reference no: EM132273592

Problem Statement:

For a given set of switches/bridges and their connections among each other, determine the spanning tree configuration for the active data-path among the switches, computed based on the spanning tree algorithm that we have learned.

To Do:

1. [Program-Input] Your program will run and read the inputs from the input.txt file. Each line in the input file is an individual problem.

For example, the first problem is given by input "5 R", which indicates that there are 5 switches and the connections among themselves are randomly (R) determined (by your "rational" program - example of "irrational" program will be the one which, may pick all switches with 0 connection most of the time - this will result in poor grade).

The second line indicates problem #2. Here, a set of individual connections to be solved among 5 switches which are given by "5 1-2 1-3 1-3 2-3 3-4 ...". Here the first digit "5" implies that there are 5 switches. Then, "1-2" indicates that switch#1 and switch #2 are physically connected by a wire. Note, by "1-3 1-3" it is indicated that switch #1 and switch #3 are physically connected twice: connection #1 is connecting port p2 (of switch #1) and p1 (of switch#3); whereas connection #2 is connecting p3 (of switch #1) and p2 (of switch #3). Here, p2 indicates port number #2 and so on.

The ports of a switch are to be connected/allocated from lower numbered port to higher numbered port for each connection by the order of the connection read from left to right for a given problem.

2. Your program will compute the corresponding spanning tree applying the algorithm discussed in the class (slides). As output, it will draw each round of intermediate configurations, including the final spanning tree configure at the end.

3. [Program-Output] Your outputs will print the problem configure first (such as "5 1-2 1-3 1-3 2-3 3-4 1-5 ..."). Then, it will draw the computed each round of intermediate configurations sequentially. Finally, it will draw the final spanning tree. The whole process to be done periodically for all the problem(s) given in the input file.

Guideline for coding

You will submit all your source code in a single java* file called SpanningTree.java. You may develop your code using separate files, but you will need to concatenate your source code together into a single compilable file for submission. The file SpanningTree.java should begin with a public class SpanningTree that contains the main program which takes the input file name as a command line argument and then performs the simulation of the given switch/bridge configuration problem in the input file. The public class SpanningTree should be followed by your other classes that comprise your system. Recall that Java will only allow one class within a source file to be declared public, so your SpanningTree.java source file will look something like this:

public class SpanningTree {
public static void main( String [] args ) {
... here lies code to process the input file and solving the Spanning Tree problem ...
}
}

Run your program and use the input.txt to get input as:
$ java SpanningTree input.txt

* If you are using programming language other than java, please adhere to the naming convention (e.g. SpanningTree.java can be SpanningTree.c)

Attachment:- CSCI 531 Computer Networks.rar

Reference no: EM132273592

Questions Cloud

Write a report detailing steps jack needs to take to gather : Write a one-page report detailing the steps Jack needs to take to gather all of the appropriate evidence and protect his company.
Summarize the importance of the fourth amendment : Summarize the importance of the fourth amendment, specifically as it applies to a forensic investigation.
Bmw-automaker competes on the digital front : One of the biggest trends driving competition in the auto industry in recent years is the race to offer new and better “connected-car” technologies
Identify physical security controls for managing access : Discuss and provide examples of network vulnerability tools that are used for troubleshooting network security issues.
Determine spanning tree configuration for active data : CSCI 5311/4311 - Computer Networks and Telecommunications University of New Orleans - determine the spanning tree configuration for the active data-path among
Discuss the options of setting pc''s to automatically update : Discuss the options of setting PC's to automatically update on their own versus using WSUS (WSUS is NOT always the best solution).
Admissibility of hear-say evidence potentially unethical : This group will also discuss what makes the admissibility of hear- say evidence potentially unethical.
What is its productivity : A fast-food restaurant serves hamburgers, cheeseburgers, and chicken sandwiches. what is its productivity?
The roles of marketing have changed over the years : The roles of marketing have changed over the years traveling through five stages:

Reviews

len2273592

4/3/2019 12:36:39 AM

You will submit all your source code in a single java* file called SpanningTree.java. You may develop your code using separate files, but you will need to concatenate your source code together into a single compilable file for submission. The file SpanningTree.java should begin with a public class SpanningTree that contains the main program which takes the input file name as a command line argument and then performs the simulation of the given switch/bridge configuration problem in the input file. The public class SpanningTree should be followed by your other classes that comprise your system. Recall that Java will only allow one class within a source file to be declared public, so your SpanningTree.java source file will look something like this: public class SpanningTree { public static void main( String [] args ) { . here lies code to process the input file and solving the Spanning Tree problem . } }

len2273592

4/3/2019 12:25:16 AM

(a) In Report_PA1 YourIDdocx, provide all different screen outputs generated by your program for all the problems given in the input.txt. (b) Provide the sourcecode and executable. The executable must be easy to run. It must not ask to install a programming package and not to ask to compile your code. You can code in java (see the guideline for coding below). (c) Provide a readme file which will describe how to run your code. (d) Compress everything in one folder except the report file and submit the compressed folder

len2273592

4/3/2019 12:24:40 AM

Instructions: Please carefully review the “integrity” section from the ‘syllabus page’ before starting the assignment. The assignment must be done by you alone. 5% overall bonus will be given where 100% accuracy is achieved for all test cases (checked by the instructor) and each round within a solution is presented (generated) by neat graphics.

Write a Review

JAVA Programming Questions & Answers

  Create a class in java with appropriate methods

Create a class in java with appropriate methods. What difficult problems did you encounter, and how did you handle them?

  Have to implement a search algorithm

Suppose you have to implement a search algorithm in a high programming language such as Java or C++. You are given a linked list that is not sorted and it's rather small, in the order of a few dozen elements.

  Analyze the scenario to determine necessary consideration

Identify the program you plan to develop and analyze the scenario to determine necessary consideration for building your program.

  Latin squares - puzzle

Solve button causes the program to display a single solution by using only the symbols from the top row of six text fields in such a way that the non-empty grid symbols are not altered.

  Evaluate the amount of a certificate of deposit on maturity

Write a GUI program to compute the amount of a certificate of deposit on maturity -  prepare a program to evaluate the amount of a certificate of deposit on maturity

  Write a class named java1306cmis141c801 that performs the

write a class named java1306cmis141c801 that performs the following actions.prompt the user for an int between lower

  Write a portion of a program for a church website

Write a portion of a program for a church's website. The program will be used for a chatting feature, which should include an Input Box that requests the user's name.  The message box should include the user's name and the Scripture of the Day (ch..

  What position along the chord does minimum pressure occur

At what position along the chord does the minimum pressure occur? What is special about the point where C p is a maximum?

  Loops and files

Convert an algorithm using control structures into Java and write a while loop

  Create your own simple java application

Create your own simple Java application to generate X random Integer values between 0 and Y. Use command line arguments for entry of X and Y

  A brief description of the game of hangman

Your program should allow the user to make a total of k=6 guesses. After the 6th guess, the game is either won with a correct guess or the game ends as a loss.

  The game of pig

Write a program that allows a single player to practice the game (that is, there will be no opponent, just a single player). Play 5 turns in the game to get a total score for the player. Refer to the sample output below for a detailed example.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd