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

Write a program to protect a computer against unauthorized access using a password. The program assigns a password to a variable.
The user is prompted to enter a password in order to enter the computer system.
If it is the correct password, display a message welcoming the user. If not, display a suitable message rejecting the attempted access.


Improve the program as follows:

Allow the user to enter a password three times. If the password is correct, display a suitable message. If all the attempts including the third attempt are incorrect, display a message rejecting access to the system

Possible algorithm:

1. Ask the password from the user
2. Compare the password
3. if password in incorrect
Display message to enter password again


Improve the algorithm to include all the steps of the solution in the correct order.
create class magicsquare [7][7] dimension
19. Create an abstract class called GeometricFigure. Each figure includes a height, a width, a figure type,
and an area. Include an abstract method to determine the area of the figure. Create two subclasses
called Square and Triangle. Create an application that demonstrates creating objects of both subclasses
and store them in an array. Save the file as GeometricFigure.java, Square.java, Triangle.java and
UseGeometric.java.

20. Modify Lab Exercise 19, adding an interface called SidedObject that contains a method called
displaySides(); this method displays the number of sides the object possesses. Modify the
GeometricFigure subclasses to include the use of the interface to display the number of sides of the
figure. Create an application that demonstrates the use of both subclasses. Save the files as
GeometricFicure2.java Square2.java, Triangle2.java, SidedObject.java, and UseGeometric2.java
I need help for my java project.which i am doing in eclipse.I need to input an xml file and extract only the information from the tags.please help how to go on about it?..should i convert it to java object first?..
suppose there is a 400kb image (1280x1024). after compression it becomes 190kb (1280x1024). let size of each pixel be 1 byte so how come the size is reduced since both have same resolution???
I know some of the information is lost.
I have a Java/J2EE application using Spring 3.1 and the MVC pattern. I am getting the following error from a JSP, regardless of whether I click on it directly or via a link. Due to the character limits of this text box, I am willing to send files as an attachment if you need to look at them.

org.apache.jasper.JasperException: java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'comment' available as request attribute
how to create a simple game using java?
Complete a program by writing a method called drawGrid that draws a table / grid on the
window from (0,0) to (x,y) where x and y are integers passed to the method drawGrid as
parameters. A method call to drawGrid is given inside mousePressed so you can test your
program by pressing the mouse at different location in the display window. A sample output
is given along side.

A table consists of -
1. a red bordered rectangle with opposite
corners at (0,0) and (x,y)
2. black vertical and horizontal lines from (0,0)
to (x,0) and (0,0) to (0,y) respectively, with a
gap of GAP between them. GAP is a final int
defined at the top of the program.
Do you know the processing code for this question.

Display window size is set to (600, 600). The targets are composed of concentric rings. Two adjacent rings have a difference of 20 pixels between their diameters. Each time the target is displayed, it shrinks to shed one ring away.

The initial number of rings in a target is between 5 and 10 (including both values). Assuming there are ‘n’ rings, the diameter of the biggest ring is n*20, of the second biggest ring is (n­?1)*20 and so on till diameter of the smallest ring is 20. The rings should alternate between a color chosen when the target is generated first, and between white. The biggest ring should be in the color set, the second biggest ring white, and so on. You should use a loop to display the ring.

When you press the mouse within a target, the score increases by 1. This score should be displayed on the bottom left side of the display window with the bottom left corner of the text­?box at (20, height-­20)

It will benefit you greatly if you create methods to initiate a target (set number of rings, the color, and the coordinates), and also a method that draws the target.
I want to print out two arrays next to each other horizontally, but can only seem to print them one after the other...

System.out.println ( "Customer ID, Transaction Value " );

for (int i = 0; i < customerID.length; i++) {
System.out.println(customerID[i]);
}


for (int i = 0; i < transactionValue.length; i++) {
System.out.println(transactionValue[i]);

I would like them to be like this.

Customer ID, Transaction Value
1, 33.33
2, 44.44
...

Any ideas?
LATEST TUTORIALS
APPROVED BY CLIENTS