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

Write an application that displays the factorial for every integer value from 1 to 10. A factorial of a

number is the product of that number multiplied by each positive integer lower than it. For

example, 4 factorial is 4 * 3 * 2 * 1, or 24.


One large chemical company pays its salespeople on a commission basis. The salespeople each receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who sells $5000 worth of chemicals in a week receives $200 plus 9 percent of $5000, or a total of $650. Develop a java program inputs each salesperson's gross sales for last week and calculates and displays that salesperson's earnings. Process one salesperson's figures at a time


write a java code that print the largest number of an array,


write a java code that declare an array which has 8 different numbers. Print the numbers of that array in reverse order.


Print the largest number of an array,


Write down a java program which will print a staircase pattern of * with 10 levels.


Write a java code that finds out the area of three geometric shape: Circle, Triangle, Square. Give the user an option to select which geometric shape's area he/she wants to find out. Based on the choice take necessary input and find out the result. Use different area method for each geometric shape. Print the result in main method.


Consider the following declarations:
public class XClass
{
private int u;
private double w;
public XClass()
{
}
public XClass(int a, double b)
{
}
public void func()
{
}
public void print()
{
}
}
XClass x = new XClass(10, 20.75);
Write a Java statement that creates the XClass object t and initializes
the instance variables of t to 20 and 35.0, respectively.
Write the definition of a class that has the following properties:
a. The name of the class is Stock.
b. The class Stock has four instance variables: name of type String,
previousPrice and closingPrice of type double, and
numberOfShares of type int.
Consider the following declarations:
public class XClass
{
private int u;
private double w;
public XClass()
{
}
public XClass(int a, double b)
{
}
public void func()
{
}
public void print()
{
}
}
XClass x = new XClass(10, 20.75);
a. How many members does class XClass have?
b. How many private members does class XClass have?

Ahmad sent 16 December at 09:43
c. How many constructors does class XClass have?
d. Write the definition of the member func so that u is set to 10 and w is
set to 15.3.
e. Write the definition of the member print that prints the contents of u
and w.
f. Write the definition of the default constructor of the class XClass so
that the instance variables are initialized to 0.
g. Write the definition of the constructor with parameters of the class
XClass so that the instance variable u is initialized to the value of a and
the instance variable w is initialized to the value of b.
h. Write a Java statement that prints the values of the instance variables of x.
LATEST TUTORIALS
APPROVED BY CLIENTS