Java | JSP | JSF Answers

Questions answered by Experts: 3 611

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

please let me know a function to verify bufferoverflow in java
Given the integer variables x, y, and z, write a fragment of code that assigns the smallest of x, y, and z to another integer variable min.

Assume that all the variables have already been declared and that x, y, and z have been assigned values .
4. Write a program that allows user to convert Celsius to Fahrenheit. Displays the output of Celsius to Fahrenheit in a table. Entries in the table should range from 10 to 100 degrees Celsius with increments of 2 degrees.
• The formula f= (9/5 * c) + 32 converts Celsius to Fahrenheit.
The result format should have one decimal place. Example 3.3 @ 4.5
3. Write a class that contains variables that hold your hourly rate of pay and the number of hours that you worked. Display your gross pay, your tax please refer in the table below and your net pay (gross pay – tax).

Grosspay Tax
Below 2000 No tax
2001 - 3000 5%
Above 3000 10 %
2. Write an application that sums the integers from 1 to 50 (That is, 1+2+3…+50). Save the file as Sum50.java.
1. The following steps calculate the percentage profit from the sale of a stock. Convert the statements below to java code.

(a) Declare all variables as type Double.
(b) Ask user to input purchasePrice.
(c) Ask user to input sellingPrice.
(d) Assign, to the variable percentProfit, 100 times the value of the difference between sellingPrice and purchasePrice divided by purchasePrice.

Display the value of the variable percentProfit.
Need a programm:
The program asks for a integer number. If its a prime number then it has to say „Prime number“.If its not then the programm has to say „number -(inserted number)- is not a prime number and divides with: …“. It has to say ALL the numbers the inserted number divides with.
Change your fraction class so that its instance variables numerator and denominator are hidden (i.e. private). Check that your old client class will not now compile (i.e, if the Fraction class instance variable name ‘numerator’ was used in the client class).
The Harrison Group Life Insurance company computes annual policy premiums based on the age the customer turns in the current calendar year. The premium is computed by taking the decade of the customer’s age, adding 15 to it, and multiplying by 20. For example, a 34-year-old would pay $360, which is calculated by adding the decades (3) to 15, and then multiplying by 20. Write an application that prompts a user for the current year and a birth year. Pass both to a method that calculates and returns the premium amount, and then display the returned amount.

Save the class as Insurance.java. Don’t forget to create the application/project InsuranceTest.java Class that has the main method and an object to use the Insurance class.
Write a JAVA program that asks the user to enter a number. Display the following pattern by writing lines of asterisks.
The first line will have one asterisk, the next two, and so on, with each line having one more asterisk than the previous line,up to the number entered by the user.For example, if the user enters 5, the output would be:
*
* *
* * *
* * * *
* * * * *
LATEST TUTORIALS
APPROVED BY CLIENTS