Write a java program to find the summation

Assignment Help JAVA Programming
Reference no: EM131074273

1) Write a Java program to find the summation of all the integers entered on command line.

$ java Add 1 2 3
6
$ java Add 3 5 1
9

- Write above program in NetBeans pass arguments through Project Properties ->run configuration.
- Write above program using JOptionPane input Dialog box.

2) Write a java program to Read five integers from the keyboard and display the one that is smallest.

3) Reading a number and determine whether it is an even or odd number. This is a sample session of running this program

Output:
Enter a number: 2
2 is even
Enter a number: 9
9 is odd
Enter a number: 8
8 is even
Enter a number: 7
7 is odd
Enter a number: 5
5 is odd

4) Create a program to compute a worker's daily salary.

input: hour_rate, number_of_hours
output: salary = hour_rate * number_of_hours

Modify the program to compute a worker's daily salary based on the following table:

--------------------------------------
| $7.00/hr | The first 8 hours |
--------------------------------------
| $9.00 /hr | After 8 hours |
--------------------------------------
For example, if a worker works 10 hours, then her/his salary is
$7.00/hr * 8 hrs + $9.00/hr * (10 - 8) hrs
Note: The number 7.00 is read from keyboard. 9.00 is fixed.

Modify the program to compute N worker's daily salary.
The number N is an input to this program.

Modify the program to compute and print N worker's total daily salary. A session of running this program would look like:

Output:
Please enter number of workers? 3
Please enter worker 1's working hours: 10
Worker 1's salary is 74
Please enter worker 2's working hours: 6
Worker 2's salary is 42
Please enter worker 3's working hours: 9
Worker 3's salary is 65
The total salary for the 3 workers is: 181

Reference no: EM131074273

Questions Cloud

Company rahman builders cavalry ground : Write a final collection letter to a company Rahman Builders Cavalry Ground for unpaid Rs.500,000/-, which is five months overdue. The company has failed to entertain any of your requests for the above amount.
Paper about school wide positive behavior support : Write a 3 to 4 page paper that outlines a School Wide Positive Behavior Support (SWPBS). Develop a Tier 1 - Primary Prevention: Universal Supports for All Students program for a school
Worksheet on developing literary criticism skills : It is likely that you began this course with a notion of what literature is, perhaps based on previous education, family or cultural appreciation, or media and/or popular culture. This course aims to expand your definition of literature through di..
Hypothetical syllogism exercise : For this critical task, you will write a 2-3-page paper. To get started, review the Hypothetical Syllogism Exercise (textbook Chapter 8, Exercise 8-3, #3). Include the following elements in your paper:
Write a java program to find the summation : CS480 - Write a Java program to find the summation of all the integers entered on command line and write above program using JOptionPane input Dialog box.
How do teaching principles varied learning styles : How do teaching principles, varied learning styles(for both nurses and patients) and teaching methodologies impact the approach to education, how do health care providers overcome differing points of view regarding health promotion
Specific grammar or punctuation error : What is a specific grammar or punctuation error that is especially persistent for you (i.e., correct usage of commas or run-on sentences)?
Codes of ethics and status and future of a global psychology : Codes of Ethics and the Status and Future of a Global Psychology Many psychological associations have established ethical codes or principles for the practice of psychology in the countries or regions they serve
Rewrite the romantic poem you selected : Rewrite the Romantic poem you selected. Focus particularly on making your rewrite read like a modernist poem in terms of its language, style, literary elements, and themes. Be sure to incorporate into your rewrite at least three of the six qualiti..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Discuss the pros and cons of compilers and interpreter

Pick a problematic situation that you think a Java program can solve or make easier.

  Write a class encapsulating the concept of student

Prepare a client class to test all the methods in your class. Make sure to add comments. Comments should be included in the program to explain your calculations and program.

  Write a java class that creates an array of integers

Write a Java class that creates an array of integers, fills it with values, prints the unsorted values, sorts the values into ascending order, and finally prints the sorted values.

  Problem regarding the initializing static fields

Why do static ?elds of a class have to be initialized when the class is loaded? Why can't we initialize static ?elds when the program starts? Give an example of what goes wrong if, instead of static ?elds being initialized too early, they are init..

  Write a java program that reads unspecified number

Write a java program that reads unspecified number of integers (the input 0 signifies the end of the input). Calculates and displays the sum and the average of the input value (not counting zero). The program also finds the maximum and minimum of ..

  Write a program that specializes in solving the equations

Write a program that specializes in solving the equations Ax=b by Doolittle's decomposition method, where a is the HIbber matrix of arbitrary size nxn and

  Create java applet to represent grade of gas

Write a java applet (not a java application program) for costco gas station. The applet will first ask you whether you are a costco customer, then the grade of gas you want to use.

  Write a java program called calctickets

write a java program called CalcTickets that prompts (asks) the user to enter a ticket number. The format of a valid ticket is C[C]DDDDD[C][C]

  Visual display of internet data and information matters

Explain why the visual display of internet data and information matters? what makes the display effective? describe what you like about the design of websites and web resources. Find at least two examples of web content on the internet that you li..

  Reverse the array, and find the largest element

find the max block of an array by splitting it into three parts: left, middle, right. And then reverse the array, and find the largest element.

  Writing a program that computes the average salary

The first programming project involves writing a program that computes the average salary for a collection of employees of different types. This program consists of four classes

  A program that reads in two integers typed on the keyboard

Write a program that reads in two integers typed on the keyboard and outputs their sum, difference, and product. Must compile correctly in Eclipse. Here is what I have done, but its wrong.

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