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

  Give at least one constructor without any parameter

We learned as popular Set implementation. Write own TreeSet class that implements following interface: You are to give at least one constructor without any parameter.

  Create using netbeans

Create, using NetBeans, a complete Java program called PatternMakerWithMethods according to the following guidelines.

  Working with abstract class and function overriding

Working with Abstract Class and Function Overriding - The program must use an abstract class and method overriding to manage the input and output

  What is the limit of nesting possible

IF statements can be nested -- that is, one (internal) IF statement within another (external) IF statement. What is the limit of nesting possible?

  Create a program that automatically generates words

Create a program that automatically generates words from letters Solution

  Write a java gui application to do temperature conversions

Write a Java GUI application to do temperature conversions between Celcius, Fahranheit, and Kelvin

  Calculation or a calendar of some activity.

1. Provide Java code for a simple class of your choice. Be sure to include at least one constructor, two methods and two fields. The fields should be private.Create a test class to construct and call the methods of your class. Describe your class and..

  Write a program to compute sinx

Write a program to compute sinx for given x. The user should supply x and a positive integer n. We compute the sine of x using the series and the computation should use all terms in the series up through the term involving xn

  Develop a Java class called RamString

Develop a Java class called RamString that correctly implements the WackyStringInterface that is provided. Write a test driver for class RamString

  Compare and determine the smallest number

The main method that begins execution of Java application

  Reads in up to 1000 non-negative integers

Write a program that reads in up to 1000 non-negative integers and displays distinct numbers (i.e., if a number appears multiple times, it is displayed only once). (Hint: Read each number and store it in an array if it is new. If the number is alread..

  Compile and run the game program

Create two classes: Zika and Plague. Each of these classes must extend the Disease class. Each of these classes must define (override) both abstract methods

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