Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

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 & Filtering

How different between LinkedList and ArrayList ? In which case we use each of them LinkedList or ArrayList?
i am writing a program for cryptography(RSA encryption),,i don't want to use encryption builtin functions of java......i want to make them own...so i want to know...which is the biggest data type for saving very very long integers....
looking for the solution to this program:

// A Vacation is 10 days
// but an ExtendedVacation is 30 days
public class DebugVacation
{
public static void main(String args[])
{
Vacation myVacation = new Vacation();
ExtendedVacation yourVacation =
new ExtendedVacation;
System.out.println("My vacation is for " +
myVacation.getDays() + " days")
System.out.println("Your vacation is for " +
yourVacation.getDays() + " days");
}
}

//*************************************************
//** ExtendedVacation class below this box **
//*************************************************

class ExtendedVacation extends Vacation
{
public ExxtendedVacation()
{
days = 30;
}

}

//************************************************
//** Vacation Class below this box **
//************************************************


class Vacation
{
protected int days;
public vacation()
{
days = 10;
}
public int getDays()
{
Part I (Chapter 4 & 5): Guess a number from 1 to 100
Example of Run-time Output Console
Welcome to the Guess the Number Game
++++++++++++++++++++++++++++++++++++

I'm thinking of a number from 1 to 100.
Try to guess it.

Enter number: 50
You got it in 1 tries.
Great work! You are a mathematical wizard.

Try again? (y/n): y

I'm thinking of a number from 1 to 100.
Try to guess it.

Enter number: 50
Way too high! Guess again.

Enter number: 30
Too high! Guess again.

Enter number: 15
Too low! Guess again.

Enter number: 23
Too high! Guess again.

Enter number: 19
Too low! Guess again.

Enter number: 21
Too high! Guess again.

Enter number: 20
You got it in 7 tries.
Not too bad! You've got some potential.

Try again? (y/n):
Error! This entry is required. Try again.
Try again? (y/n): x
Error! Entry must be 'y' or 'n'. Try again.
Try again? (y/n): n

Bye - Come back soon!

Press any key to continue . . .
Operation
• Write a class called GuessGame with all business logics for guess game, Use the Validator class in
Part I (Chapter 4 & 5): Guess a number from 1 to 100
Example of Run-time Output Console
Welcome to the Guess the Number Game
++++++++++++++++++++++++++++++++++++

I'm thinking of a number from 1 to 100.
Try to guess it.

Enter number: 50
You got it in 1 tries.
Great work! You are a mathematical wizard.

Try again? (y/n): y

I'm thinking of a number from 1 to 100.
Try to guess it.

Enter number: 50
Way too high! Guess again.

Enter number: 30
Too high! Guess again.

Enter number: 15
Too low! Guess again.

Enter number: 23
Too high! Guess again.

Enter number: 19
Too low! Guess again.

Enter number: 21
Too high! Guess again.

Enter number: 20
You got it in 7 tries.
Not too bad! You've got some potential.

Try again? (y/n):
Error! This entry is required. Try again.
Try again? (y/n): x
Error! Entry must be 'y' or 'n'. Try again.
Try again? (y/n): n

Bye - Come back soon!

Press any key to continue . . .
Operation
• Write a class called GuessGame with all business logics for guess game, Use the Validator class in
Write an application that prompts the user to enter the sales for each employee, then it calculates the salesperson’s salary. The process repeats until the user finishes entering all employees' information. When the user is done entering this information, it displays how many of the salespeople earned salaries in each of the above ranges
Minesweeper : This question is expected to be quite time-consuming. You may consider skipping it if you don’t have enough time.
Write a program that let you play customized minesweeper. The program will first let user enter a number N, and then a map in N * N size will be created. Also, N mines will be randomly spreaded on the map.
Write a program to let user enter a sequence of numbers, then the program will find the longest palindromic substring , and visualize it using ascii characters. .
Consider the following implementation of a class Square:

public class Square
{
privateintsideLength;
privateint area; // Not a good idea

public Square(int length){
sideLength = length;
}
publicintgetArea(){
area = sideLength * sideLength;
return area;
}
}

Why is it not a good idea to introduce an instance variable for the area? Rewrite the class so that area is a local variable.
i need some help i need to initialize a 2d array named airplane of type int having values 0 and 1 only.row and column size is 12 and 7.How do i do it?
LATEST TUTORIALS
APPROVED BY CLIENTS