Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Need help with this java program. have added the instructions based on whats on the homework assignment.

Program : Make a simple program that count 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.

Input: In the first line, a number of computers is given and it's less than 100. The second line is a number of edges that represents a connection between two computers.

After second line, each line has two numbers that represent two computers that are connected. In the last line, a computer number is given as the first computer that is infected.

Ouput: Number of computers infected by the first infected computer.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93063618

Have any Question?


Related Questions in Computer Engineering

Bierco is a beer company based in germany you purchased the

BierCo is a beer company based in Germany. You purchased the stock in 2011 for 100 Euros when the exchange rate was 1.4 EUR/ USD. Today BierCo's price is 120 Euros and the exhange rate is 1.12 EUR/USD. What is the dollar ...

If a html or pdf full text link to an article is shown can

If a HTML or PDF Full Text link to an article is shown, can you access that source by clicking on the full text link?

To determine in a born-haber cycle how exothermic the

To determine, in a Born-Haber cycle, how exothermic the formation of KCl from potassium metal and chlorine gas is, we need to know the heat of atomization (vaporization) of potassium, the heat of atomization of chlorine ...

Answer the following question where does the responsibility

Answer the following Question : Where does the responsibility of the software developer reside in considering the discrimination in techonology based on gender race and disability? How do you think it affects you as a pr ...

What is asymmetric information and how does it affect the

What is asymmetric information and how does it affect the consumer or buyer?

A compare the properties of cpu registers with the main

(a) Compare the properties of CPU registers with the main memory in MIPS.  (b) Describe the purpose of the stack pointer ($sp) for procedure calling. (c) What is a "basic block" and how is it used by a compiler? (d) Ther ...

Question suppose that you were creating a new global

Question : Suppose that you were creating a new global organization. The new organization will provide Information Technology (IT) infrastructure consulting services, computer security consulting services, and cloud comp ...

In a survey of 3236 adults 1470 say they have started

In a survey of 3236 adults, 1470 say they have started paying bills online in the last year. Construct a? 99% confidence interval for the population proportion. Interpret the results.

Question suppose that you have called a function called

Question : Suppose that you have called a function called sphere that creates (stores points and normals in a vertex Array and in the buffer) a sphere of radius 1 centered at the origin. Write the portions of the render ...

Question it has been stated that the increase in adoption

Question : It has been stated that the increase in adoption of cloud computing is similar to the story of why companies moved to adopted the public electrical grid. What motivated companies to adopt the public electrical ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As