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

Build a complete java program using JOptionPane that randomly generates a lottery of a three-digit number,prompts the user to enter a three-digit number, and determines whether the user wins according to the following rule:
a. if the user input matches the lottery in exact order the award is 5,000
b.if the user input matches three digits in different order, the award is 2,000
c.if any 1 or 2 digits in the user input matches the lottery the award is 5,00

Note
1 if the user keyed in less than three digits or more than 3 digits prompt an error message and urge the user to key in again the numbers.
2.use widow for input and output.
Create a class called Invoice that a hardware store might use to represent an invoice for an item sold at the store. An Invoice should include four pieces of information as instance variables: a part number (type String), a part description (type string), a quantity of the item being purchased (type int) and a price per item (double). Your class should have a constructor that initializes the four instance variables. Provide a set and get method for each instance variable. In addition provide a method named getInvoiceAmount that calculates the invoice amount (i.e. multiplies the quantity the price per item), then returns the amount as a double value. If the quantity is not positive, it should be set to 0. If the price per item is not positive, it should be set to 0.0. Write a test application named InvoiceTest that demonstrates class Invoice’s capabilities.
store six of your friend's age in a single array. Assign the ages in a random order. Displaye ages, on reverse order.
accept ten different integers from the user and display these numbers after sorting them in increasing order.
accept marks of five students and then displays their average. The program shoud not accept mark which is less than 0 and mark greater than 100. use array concept.
computes the sum of the following series.
Sum=1!+2!+3!+4!+........n!
Write a void method Shift that takes three parameters A, p, d.
A is an array, p is the number of positions and d is the direction (L = left, R = right). The
method should shift the contents of A p positions in the d direction.
(B) To test your method, write a program that reads an array of 10 elements then calls
Shift twice and prints the array after each call.
Ask the user to enter two polynomials at a time. For each polynomial, ask the user to
enter the number of terms n in the polynomial, then prompt the user n times for a pair of
integers representing the coefficient and the exponent of a term. For instance, the term
2x4 has a coefficient of 2 and an exponent of 4.
Output the input polynomials as well as the sum and product of polynomials.
A sample input/output run is as follows.
The output polynomials must be sorted in descending order of exponent. Terms of the
same exponent should be added together and the term with zero coefficients should not
be output.
4. Your toString method ought to print polynomials
A polynomial is either zero or can be written as the sum of one or more terms. Each term
consists of a coefficient and an exponent.
A consulting firm maintains a database of its employees (a number of consultants) and a list of projects it has accomplished, has been developing, and is about to start. Details about the consultants and projects are given below:
o Each consultant has an employee ID, a name, address, gender, and is responsible for not more than five (5) projects.
o An address has a house number, street name, city and postcode.
o A consultant can be on a full-time or a part-time basis with the firm. A full-time consultant has an annual salary. A part-time consultant has an hourly rate and a maximum number of hours s/he can work.
o A project has a project ID, a client’s name and the cost charged by the firm to the client.
can i get a join,dergister and balance check,add and subtract method in java....What would they look like...say i want to add a member ,delete the person ...add a balance or just check...thank you
LATEST TUTORIALS
APPROVED BY CLIENTS