Re-run the program with a different input

Assignment Help Business Management
Reference no: EM131687858

Use JGrasp to complete the following programs and understand what they do. Some of these programs are similar to those you completed in Lab #6.

Exercise 1: Java program (called Practice_7_1) that uses while loops to read an integer number between 20 and 60, then the program prints out the entered value followed by (on a separate line) the sum of all even integer values between 2 and the entered number (including the entered value if even). Use a while loop to validate the user input before determining and printing the sum. In addition, design your program such it allows the user to re-run the program with a different input. Use proper labels for the outputs as shown in the examples below.

Entered value: 20

Sum of even numbers between 2 and 20 is: 110

Entered value: 25

Sum of even numbers between 2 and 25 is: 156

Entered value: 30

Sum of even numbers between 2 and 30 is: 240

Entered value: 40

Sum of even numbers between 2 and 40 is: 420

Entered value: 60

Sum of even numbers between 2 and 60 is: 930

Exercise 2: Java program (called Practice_7_2) to read a sentence (as a string) from the user, the program then prints out the entered sentence. Then, print out the sentence one word per line using the space (blank) character as are delimiter. Use proper labels for the outputs as shown in the examples below. Design your program such it allows the user to re-run the program with a different input.

Entered String: This is a test input, and can be a longer string too.

Word #1: This

Word #2: is

Word #3: a

Word #4: test

Word #5: input,

Word #6: and

Word #7: can

Word #8: be

Word #9: a

Word #10: longer

Word #11: string

Word #12: too.

Reference no: EM131687858

Questions Cloud

Explain the evolution of electronic health records : Determine the issues impacting the electronic legal health records. Provide a rationale for your response.
Connection to wrap-around : What's the fewest number of hours it can take for a 50kb/s connection to wrap-around, i.e., to start reusing sequence numbers? Answer in hours to the nearest.
What are the two major type of compression : What are the two major type of compression, explain? Identify and explain which type is the best for compressing an encyclopedia.
Describe the managing the financial system : Describe the managing the financial system. How accurate are these predictions and how should a financial manager of a state agency apply them?
Re-run the program with a different input : Use JGrasp to complete the following programs and understand what they do. Some of these programs are similar to those you completed in Lab #6.
Compare different liabilities for selling education products : Ashley met Adam at a party and after a couple of drinks; Ashley found out that Adam is in the business of selling education products.
Approach advocated by richard stallman and others : Consider the "Free Software" approach advocated by Richard Stallman and others. Do you think this approach should be adopted?
General manager about some data storage problems : You're the IT administrator for CSM tech Publishing. You've just had a meeting with the general manager about some data storage problems
What marketing plan could be taken to minimize perception : What marketing challenges would ensue should a major health care provider drop a service that is socially popular but economically unprofitable?

Reviews

Write a Review

Business Management Questions & Answers

  Caselet on michael porter’s value chain management

The assignment in management is a two part assignment dealing 1.Theory of function of management. 2. Operations and Controlling.

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. Due to increase in the preference for light beer drinkers, Chris Prangel wants to introduce light beer version in Mountain Man. An analysis into the la..

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. An analysis into the launch of Mountain Man Light over the present Mountain Man Lager.

  Analysis of the case using the doing ethics technique

Analysis of the case using the Doing Ethics Technique (DET). Analysis of the ethical issue(s) from the perspective of an ICT professional, using the ACS Code of  Conduct and properly relating clauses from the ACS Code of Conduct to the ethical issue.

  Affiliations and partnerships

Affiliations and partnerships are frequently used to reach a larger local audience? Which options stand to avail for the Hotel manager and what problems do these pose.

  Innovation-friendly regulations

What influence (if any) can organizations exercise to encourage ‘innovation-friendly' regulations?

  Effect of regional and corporate cultural issues

Present your findings as a group powerpoint with an audio file. In addition individually write up your own conclusions as to the effects of regional cultural issues on the corporate organisational culture of this multinational company as it conducts ..

  Structure of business plan

This assignment shows a structure of business plan. The task is to write a business plane about a Diet Shop.

  Identify the purposes of different types of organisations

Identify the purposes of different types of organisations.

  Entrepreneur case study for analysis

Entrepreneur Case Study for Analysis. Analyze Robin Wolaner's suitability to be an entrepreneur

  Forecasting and business analysis

This problem requires you to apply your cross-sectional analysis skills to a real cross-sectional data set with the goal of answering a specific research question.

  Educational instructional leadership

Prepare a major handout on the key principles of instructional leadership

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