Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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

Java, Programming

  • Category:- Java
  • Reference No.:- M91801119
  • Price:- $15

Priced at Now at $15, Verified Solution

Have any Question?


Related Questions in Java

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

  • 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