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 a code that takes in a person's height in inches and weight in pounds and outputs it in centimeters and kilograms. (1 in = 2.54cm , 1kg = 2.2 lbs.)
Can you help me how to write the code?
Thanks
create the following web page named "QuestionPaper.jsp".
1)8 litres are drawn from a cask full of wine and is then filled with water.This operation is performed three more times.The ratio of the quantity of wine now left in cask to that of the water is 16:65.How much wine did the cask hold originally
a)18 litres
b)24litres
c)32litres
d)42litres
Next
a)When you click the Next button,it should invoke another jsp the named "AnswerValidator.jsp".
b)"AnswerValidator.jsp" should accept the answer from the "QuestionPaper.jsp" and it should display the answer.
how to retrieve data from database trigger to hibernate
Create a new project in BlueJ called Assignment1. All classes for the assignment are to be saved in this project.

2. Create the required classes for the project - there should be at least three (3) classes: User, Phone and Battery. You can have any number of additional classes you think are required.

3. Class basics:
User – a user owns 1 phone, they also have a name and an amount per month they pay for their phone
Phone – a phone has a brand, a model and 1 battery. It must also store information about the phone such as whether the phone is on, if it is locked, last dialled number etc (see below)
Battery – a battery has a life i.e. the charge left in the battery and a maximum life (see below)

4. Constructors: all classes must have at least 1 alternate constructor that accepts input parameters used to initialise the class attributes (done in the body of the constructor).
What does this code do?

Info regional = ((info)Name.bytesToObject(data));

Here Name is a class and data is an array
I am trying to add a method after the main method that will do a divison problem and show the answer on the screen.
explain about public static void main(string[] args) in oneline only
Create the class Pet that has the following members:
 private:
a. name
b. age
c. Weight
 public
a. Add all the accessor and mutator methods.
b. Add the default constructor. That set the data members to empty string, 0, 0 respectively.
c. Add a non-default constructor that takes the name of the pet, age, and weight as parameters.
d. Add the method printInfo which prints the information of the pet.
e. Add a method compareWeight of the pet and other pet. Hint: this method takes an object otherPet.
The method returns 1 if the pet (caller) is heavier, returns -1 if the pet is lighter than the other pet,
and returns 0 if their weights are equals.
f. Add the method toString()
 Write the main application (contains the main method) that uses the class Pet as follows:
a. Declare a reference cat1 to class Pet.
b. Create an object of the class Pet and refer to it with cat1. (use the default constructor).
c. Set the data members to “Tommy”, 1, 1.5.
d. Prints the information of Tommy using printInfo() method
e. Create another object (“wilson”,2, 3.2) and refer to it with cat2.
f. Use toString() method to print the information of Wilson.
g. Compare the weight of cat2 with cat1. Let cat2 be the caller. Then prints the proper message which
tells the user which pet is heavier.
Note: make sure to do input validation: Do not accept negative numbers for any information (age
and weight), otherwise, set the value to 1.
MIS 306
Managerial Applications Using Object Oriented Programming II
Assignment 2
Due Date: Monday, June 25
th
, 2012
 What is the output of the following code? Hint use the following as the input of the user
respectively
4
Ali
Accounting
Duaa
MIS
Mona
MIS
Mohammed
Finance
MISCreate the class Pet that has the following members:
 private:
a. name
b. age
c. Weight
 public
a. Add all the accessor and mutator methods.
b. Add the default constructor. That set the data members to empty string, 0, 0 respectively.
c. Add a non-default constructor that takes the name of the pet, age, and weight as parameters.
d. Add the method printInfo which prints the information of the pet.
e. Add a method compareWeight of the pet and other pet. Hint: this method takes an object otherPet.
The method returns 1 if the pet (caller) is heavier, returns -1 if the pet is lighter than the other pet,
and returns 0 if their weights are equals.
f. Add the method toString()
 Write the main application (contains the main method) that uses the class Pet as follows:
a. Declare a reference cat1 to class Pet.
b. Create an object of the class Pet and refer to it with cat1. (use the default constructor).
c. Set the data members to “Tommy”, 1, 1.5.
d. Prints the information of Tommy using printInfo() method
e. Create another object (“wilson”,2, 3.2) and refer to it with cat2.
f. Use toString() method to print the information of Wilson.
g. Compare the weight of cat2 with cat1. Let cat2 be the caller. Then prints the proper message which
tells the user which pet is heavier.
Note: make sure to do input validation: Do not accept negative numbers for any information (age
and weight), otherwise, set the value to 1.
public class Over {
public int stack(int j, int k) { return j + k; }
public int stack(int m) {
return m * m;
}
public int stack(float f) {
return (int)f * 5;
}
public static void main(String args[]) {
int n = 3;
float f = 3;
Over o = new Over();
System.out.println("" + o.stack(n, n));
System.out.println("" + o.stack(n));
System.out.println("" + o.stack(f));
}
}
what is this line do ? =====> over o = new over(); what is happen if we dont use this line?
LATEST TUTORIALS
APPROVED BY CLIENTS