Design a "hello world" program in java

Assignment Help Computer Engineering
Reference no: EM1328308

Design a Java "Hello World" program that should mimic distributed processing of printing the string "Hello World!" on display.

For doing this the main() method should just create 5 threads and store references to them in an array of threads, which will be passed to each thread for communication purposes. Then the main() method should start all threads, wait for their completion and exit. It must not control the threads in any way or send any other information to them.

Each thread will compete for the display access and once it is granted, the thread prints out only one character of the string (namely the next one in order) and then starts to compete for the display access again for printing the next character. If all characters of the string are printed, the thread exits. This way each of the threads will execute the same algorithm and print just a few string characters.

Printing a string character can be considered as a critical part of the thread code. For this, implement a mechanism providing mutual exclusion, but without using any synchronization approaches (semaphores, locks, etc.). Each of the threads should be able to communicate with other threads by sending messages to them. The communication must be purely distributed in the sense that no other shared object is available to threads besides of the Thread array workers.

Reference no: EM1328308

Questions Cloud

Discusses weaknesses and their remedies : Describe an unknown company with technological computer products that are similar to Apple Inc. This information will help this unknown company to increase its market share.
Elucidate a firm competes in the market : Elucidate a firm competes in the market. Does the firm engage in price or non-price competition
Explain paypal''s business model - major drivers : Explain Paypal's Business Model - Major Drivers and why has it become such a success when other forms of digital cash have failed
Time value of money-internal rate of return : You're given a business opportunity to spend $12000 in Joe's Bakehouse. He offers to pay you $6000 in two year's time and then $11000 in 4 years' time. Find out the internal rate of return without using Excel.
Design a "hello world" program in java : Each of the threads must be able to communicate with other threads by sending messages to them. The communication should be purely distributed in the sense that no other shared object is available to threads besides of the Thread array workers.
Economists have estimated the subsiquent transportation : Economists have estimated the subsiquent transportation elasticities.
Explain student query- e-business : Explain Student query- E-Business and Difference between Internet and Intranet and Extranet
Show the change management and technology demands : I would like to know how large firms and short firms utilize change management concepts to meet growing technology demands.
Brand extensions can endanger brands : Consider the statements "Brand extensions can endanger brands" and "Brand extensions are an important brand growth strategy." Take a stand and justify one statement, supporting it with examples.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Reconfigur the network for your company

You could like to automate entry and updating of the routing information, however you are concerned regarding the excessive memory and the processor utilization in case you implement the dynamic routing protocols.

  Express the top five categories of problems

Compare the two different systems and present the findings in tabular format.

  Implementing the code

Write down a program which uses a structure named CorpData in order to store the following information about a company division: Involve a constructor that enables the division name and four quarterly sales amounts to be specified at the time a Cor..

  Different graphics files

Different graphics files were send via email from an unknown source to the suspect in an ongoing investigation.

  Create a compensation structure

Evaluates both approaches (job-based and person-based) and creates a compensation structure based on both approaches. In considering both approaches, what would the compensation structure look like for each position? Justify your recommendations w..

  How to set up or recover cybersecurity

How to set up or recover cybersecurity.

  Supply supporting evidence for the decision

Now that you have a normal plan and have identified the information that you need for this program, you feel you are ready to start development. You told your uncle that you would need to purchase software for this program. Since your uncle is in ..

  Interviewing for chief information officer

XYZ is interviewing candidates for position of Chief Information Officer (CIO). They are inquiring the candidates to explain briefly how they could satisfy their requirements as described above. State how would a successful candidate respond to th..

  Kinds of digital and logical evidence

State some of the kinds of the digital and logical evidence, and special content data investigators may require to gather during an actual cyber-terrorism case.

  Dissolve method

It does this by incrementing (by 1) all the three color elements (utilizing the above accessor and mutator methods) as well as alpha component value. Write down the dissolve method.

  Program for translates letter grade into number grade

Write down a program which translates the letter grade into number grade.

  How to compare and contrast the two systems

In San Jose, CA, Riordan Manufacturing Company is in the procedure of upgrading all computers. Windows 2K is the network operating system. IT has decided to upgrade the network operating system, and your team is tasked with evaluating both Windows..

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