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

Design and implement a class called Laptop that contains instance data for the manufacturer , processor, ram capacity , and model price. Define the Laptop constructor that accepts and initializes these variables. Include getters and setters for all instance data. Include a toString method that returns a nicely formatted multiline description of the Laptop. Create a driver class called LaptopCollection whose main method instantiates and updates several Laptop objects.
Create two classes Date and GroceryItem with their respective fields given in
Q2) The monthly sunshine record for a holiday resort follows.

month jan feb march april may june july aug sep oct nov dec

hours of sunshine 100 90 120 150 210 250 300 310 280 230 160 120


Write a program to do the following.
(a) Store the names of the months and the hours of sunshine in two one-dimensional arrays.
(b) Calculate and display the average number of hours of sunshine over the year.
(c) Calculate and display the names of the months with the highest and lowest number of hours of sunshine.
an application that allows a user to enter values for an array of seven Salesperson objects. Offer the user the choice of displaying the objects in order by either ID number or sales value. Save the application as SalespersonSort.java.
Write Java application program to be used to evaluate the credit worthy of a client. The program reads
the credit limit and the price and quantity of the item to be purchased by the client. If the value of the
goods is more than the credit limit, the program displays “Sorry you cannot purchase goods worthy such
a value on credit” and allows the customer to re-enter the quantity, otherwise, displays “Thank You for
purchasing from us” and the value of the purchase. This should be repeated for n customers.
A program is required for a computer game. The user keys in the number of rounds he wishes to play.
For each round the user enters his lucky number. The program takes the number and divides it with a
secret number. If the remainder of the division is zero, it is considered a draw for the round and the total
score is incriminated by 1. Otherwise if it is any other even number, it is considered a win for the round
and the total score is incremented by 3. However if it is an odd number, it is considered a loss for the
round and the total score is decremented by 3. This is done until he completes his rounds. He wins if the
total score at the end is a positive number. Write a Java program to accomplish this.
what is the use of interfaces in java
Untitled
1
Integer V lies strictly between integers U and W if U < V < W or if U > V > W.
2
A non-empty zero indexed array A consisting of N integers is given.
3
A pair of indices (P, Q), where 0 ≤ P < Q < N is said to have adjacent values if no value in the array lies strictly between values A[P] and A[Q].
4
For example, in array A such that:
5
A[0] = 0
6
A[1] = 3
7
A[2] = 3
8
A[3] = 7
9
A[4] = 5
10
A[5] = 3
11
A[6] = 11
12
A[7] = 1
13

14
The following pairs of indices have adjacent values:
15
(0, 7), (1, 2), (1, 4), (1, 5),
16
(1, 7), (2, 4), (2, 5), (2, 7),
17
(3, 4), (3, 6), (4, 5), (5, 7).
18

19
For example, indices 4 and 5 have adjacent values because there is no value in array A that lies strictly between
20
A[4] = 5 and A[5] =3; the only such value could be the number 4, and it is not present in the array.
21

22
Now, Find the distances among all adjacent pairs in the array.
Write the pseudocode that will produce a slip similar to the one illustrated at the beginning of the question. Your solution should satisfy the following requirements:
• The solution must illustrate the use of good programming practices;
• The solution must make use of a loop;
• The loop must make use of a sentinel value;
Write the pseudocode that will produce a slip similar to the one illustrated at
the beginning of the question. Your solution should satisfy the following
requirements:  The solution must illustrate the use of good programming practices;  The solution must make use of a loop;  The loop must make use of a sentinel value.
(22)
LATEST TUTORIALS
APPROVED BY CLIENTS