Program 3: Make a program that counts infected computers on a computer network. The virus spreads...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Program 3: Make a program that counts infected computers on a computer network. The virus spreads through the network, and every computer that is connected to an infected computer is infected. For example, there are seven computers and connected like the figure below. If computer #1 is infected, computer #3 and 6 will be infected through infection of computer #2 and 5. Computer #4 and 7 are safe. So, totally four computers are infected. Please implement your algorithm in Java but not use API. Example Input: 7 6 12 23 15 52 56 1 Input: In the first line, a number of computers is given and there is no limit. The second line is a number of edges that represents a connection between two computers. After the second line, each line has two numbers that represent two computers that are connected. In the last line, a computer (ID) number is given as the computer first infected. 4 7 1 2 Ouput: Number of computers infected by the first infected computer. Output: 4 6 3 7 Part 3: Write a JavaFX program that let the user to select a signal major or multiple majors from a list of majors and display the selected majors in the text area as shown below. The program should let the user to choose a Selection Mode from: SINGLE or MULTIPLE. When the program starts no items should be displayed in the text area. The list of Majors are given below: Cyber Security Cyber Forensics Networks Security Computer Networks Data Management Data Analytics Software Development Web Design Applications Development IT Majors TYCOWORKS Securty Computer Networks IT Majors Choose Selection Mode: SINGLE Cyber Security Cyber Forensics IT Majors Networks Security Computer Networks Choose Selection Mode: SINGLE Data Management Data Analytics Software Development Data Management Data Analytics Software Development Web Design Applications Development Choose Selection Mode MULTIDIE No items selected Selected items are: Software Development 0 Selected items are: Selected items are: X X X Program 3: Make a program that counts infected computers on a computer network. The virus spreads through the network, and every computer that is connected to an infected computer is infected. For example, there are seven computers and connected like the figure below. If computer #1 is infected, computer #3 and 6 will be infected through infection of computer #2 and 5. Computer #4 and 7 are safe. So, totally four computers are infected. Please implement your algorithm in Java but not use API. Example Input: 7 6 12 23 15 52 56 1 Input: In the first line, a number of computers is given and there is no limit. The second line is a number of edges that represents a connection between two computers. After the second line, each line has two numbers that represent two computers that are connected. In the last line, a computer (ID) number is given as the computer first infected. 4 7 1 2 Ouput: Number of computers infected by the first infected computer. Output: 4 6 3 7 Part 3: Write a JavaFX program that let the user to select a signal major or multiple majors from a list of majors and display the selected majors in the text area as shown below. The program should let the user to choose a Selection Mode from: SINGLE or MULTIPLE. When the program starts no items should be displayed in the text area. The list of Majors are given below: Cyber Security Cyber Forensics Networks Security Computer Networks Data Management Data Analytics Software Development Web Design Applications Development IT Majors TYCOWORKS Securty Computer Networks IT Majors Choose Selection Mode: SINGLE Cyber Security Cyber Forensics IT Majors Networks Security Computer Networks Choose Selection Mode: SINGLE Data Management Data Analytics Software Development Data Management Data Analytics Software Development Web Design Applications Development Choose Selection Mode MULTIDIE No items selected Selected items are: Software Development 0 Selected items are: Selected items are: X X X
Expert Answer:
Answer rating: 100% (QA)
Part 1 Counting Infected Computers on a Computer Network Heres a Java program that implements the algorithm to count the number of infected computers on a computer network java import javautilArrayLis... View the full answer
Related Book For
Accounting Information Systems
ISBN: 9780132871938
11th Edition
Authors: George H. Bodnar, William S. Hopwood
Posted Date:
Students also viewed these computer network questions
-
a. Example 13-1: Batch Reactor with an Exothermic Reaction Wolfram 1. Adiabatic Case: Use Wolfram to see whether you can find a trajectory that is ready to ignite and whose trajectory looks like a...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
After graduation, you begin your new job. Naturally, you're already thinking about retirement. You estimate you'll need $2 million to comfortably stop working, 40 years from now. If market returns...
-
Northsea and East coast are neighboring countries that permit workers to cross their border freely. Both have industries that use the same technologies to produce computers and brooms using skilled...
-
Why is a preemptive right important?
-
An airline manufacturer incurred the following costs last month (in thousands of dollars): Requirements: 1. Assuming the cost object is an airplane, classify each cost as one of the following: direct...
-
The following account balances come from the records of Springfield Company. During the accounting period, Springfield recorded $32,000 of service revenue on account. The company also wrote off a...
-
In a worm and worm wheel, worm wheel has 120 teeth. The length of handle is 30cm and diameter of load drum is 10 cm. To lift a load of 1800N effort of 350N is required. If maximum efficiency is 40%,...
-
Paula Boothe, president of the Bridgeport Corporation, has mandated a minimum 10% return on investment for any project undertaken by the company. Given the company's decentralization, Paula leaves...
-
A partial common-size income statement for Jag Company for three years is shown below. Net sales Item 2019 2018 2017 100.0 100.0 100.0 60.5 63.0 62.5 21.0 19.0 20.5 Cost of goods sold Other expenses...
-
Jackson Ltd ( Jackson ) acquired 1 0 0 % of the ordinary share capital of James Ltd ( James ) for shs 1 0 , 0 0 0 , 0 0 0 on 1 st January 2 0 1 1 . This figure included shs 9 6 0 , 0 0 0 for...
-
Determine if Apple Inc is achieving their strategic goals and customer satisfaction. Choose a business process and analyze the business process starting with a process map. Can this process be...
-
Due to the Covid - 1 9 , UTRGV decides to replace 5 0 % of face - to - face classes with on - line classes in 2 0 2 1 . Because of this conversion, UTRGV decides to sell or get rid of technology...
-
You are the owner of A Rinky Dink Company and you have been very successful in your business undertakings and the company has been able to grow at a modest rate of 2%. You expect that the company...
-
There are two retailers serving the demand in two regional markets separately. Assume the demands in the two regions are independently and identically distributed with probabilities P(Di = 100) =...
-
In Exercises evaluate the limit, using LHpitals Rule if necessary. lim 07x cos x X
-
Identify the main features of control over inventories and production.
-
Fraud is a serious issue in almost all organizations. Assume that you are an outside consultant to a regional clothing retailer. You have agreed to write a brief report outlining ways to manage the...
-
Explain son father grandfather file retention.
-
Identify and briefly explain the three levels of strategy and explain their differences.
-
Identify and briefly describe the purpose and functions of a management system, work process and organization policy.
-
Identify and describe the relationship between the strategy formulation process and the strategy implementation process.
Study smarter with the SolutionInn App