Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Business Management Expert

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.

Business Management, Management Studies

  • Category:- Business Management
  • Reference No.:- M92496556
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Business Management

How could legislation impact on operations within your

How could legislation impact on operations within your organisation in relation to innovation, project management, and operational planning? Briefly outline any relevant requirements (e.g. intellectual property, WHS).

Discuss 5 of the most important sql server management

Discuss 5 of the most important SQL Server Management Studio (SSMS) features. Provide references - website link, book, article, etc.

Why is it important to engage on sustainabilityis it

Why is it important to engage on sustainability? Is it possible for stakeholder relationship to be only one-way? Discuss What is meant by a ladder of stakeholder engagement?

One of the issues in early virtualization use was slow

One of the issues in early virtualization use was slow performance due to translation of system commands. Which piece of computer hardware was revised to run hypervisors natively? Also There are three "families" of opera ...

How to create effective ethical polices in the work place

How to create effective ethical polices in the work place? What is the impact of ethical assessment in the work place? How to classify Alcoa's ethical work climate?

Discussion boardwhat is a smart sustainable city in your

Discussion Board: What is a smart sustainable city in your opinion? Course name: NEW Product and Service Innovation

Which of the following is included in the conflict

Which of the following is included in the conflict management process? 1. Schedule a meeting with those affected 2. Brainstorm possible solutions that best serve your purposes. 3. Avoid the conflict entirely.

How ineffective communication and resource constraints can

How ineffective communication and resource constraints can impact on time-management within projects?

What are key factors that must be planned prior to arriving

What are key factors that must be planned prior to arriving to the contingency location?

Explaining how professional etiquette can impact

Explaining how professional etiquette can impact professional relationships. Consistently displaying proper etiquette is a reflection of one's organization and can build or destroy business relationships. explain the imp ...

  • 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