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

(calculating Sales) an online retailer sells five products whose retail prices are as follows:
Product 1, $2.98; product 2, $4.50, product 3, $9.98; product 4, $4.49 and product 5, $6.87.
Write an application tht reads a series of numbers as follows:
a) product number
b) quantatity sold

Your program should use a switch statement to determine the retail price for each product. It should calculate and display the total retail value of all products sold. Use a sentinel-controlled loop to determine when the program should stop looping and display the final results.
1. The program should start and ask the user what to do. E.g. enter students’ marks or end program.
2. If the user selects to enter students’ marks, then the program can start taking input (Students’ name and exam marks) and store in the program.
3. If the user finishes with the data entry, the program will show numbers of data that had been entered.
4. Next, the program will ask user what to do next.
5. One option, user can choose the program to display the students’ list alphabetically.
6. Another option, the user can choose so that the program calculates the grade for each of the students’ marks and display the list from highest to lowest.
7. Thirdly, the program can display the number of student according to the grade e.g.
Grade A – 10 students
Grade B – 3 students
Grade C – 7 students
Grade F (Fail) – 0 students
8. Finally, the program can choose to close or continue.
Write a application that can determine if a 5 digit number you input is a palindrome. If the number is a palindrome then print "The number is a palindrome." If it is not then print "The number is not a palindrome"
We have to use an Array
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.util.Scanner;

import javax.swing.JFrame;

import acm.graphics.GCanvas;
import acm.graphics.GRect;

/**

public class GRectDemo {

static final int BAR_WIDTH = 40;


public static void main(String[] args) {

// Start by building the rectangle

GRect bar = new GRect(0,460, BAR_WIDTH, 8);
bar.setColor(Color.DARK_GRAY);
bar.setFilled(true);

// Then build a canvas to hold the rectangle

GCanvas gc = new GCanvas();
gc.setPreferredSize(new Dimension(BAR_WIDTH, 40));

gc.add(bar);
why does rectangle flip to top of screen?
Building a GRect program in java, it creates rectangle and then allows user to enter a new height of the rectangle. When the program runs the rectangle starts at the bottom left of the screen which it should but when user enters new height the program flips the rectangle to the top of screen and the rectangle grows down the screen, any help?
Problem Description:
1. Prompt the user to enter a whole number from 1 to 9 inclusive. The number zero (0) will be used
to exit the application. If any other number is entered, then an error message shall be displayed
and then the prompt to enter a whole number will be re-displayed.
2. Create a pyramid structure by using only the odd numbers without going over the number entered
in by the user. For example:
If the user entered in 8, then construct your pyramid using the numbers 1, 3, 5, and 7.
3. The pyramid shall be constructing by repeating the odd number the same number of times as its
value. For example:
The number 1 will be repeated only once.
The number 3 will be repeated three times.
The number 5 will be repeated five times.
4. The pyramid shall be centered accordingly, with the highest odd number being the most left align.
This will require you to calculate the center of the pyramid based upon the highest odd number.
The number one (1) will always be in the center
I am doing a project in netbeans using java,jsp and servlet(MVC) and i have a login page where i need to segregate the roles of admin and user using XML. How can i perform this and also how a user can change his password from GUI itself? Please help me as soon as possible.
prompts the user to enter 10 integers from 0 to 100. Keep these numbers in an array of integers named yourNumber[]. From this array, calculate and display the sum of all these 10 numbers. Next, identify and display the largest and the smallest number. Finally, provide the number of integers in this array which are odd numbers. Take note that all input from user will be handled by the input dialog method from JOptionPane class and all repetitive tasks must be executed using for or while loops.
print a heart...using asterix(*) ......in java
hello.i have a homework in java wich asks to create this program:
there would be n persons who are going to rate songs.
for n persons we will ask their name,surname,sex and age.after this each person will rate(vote) with points the song we have given to them.there are 15 songs and they are constant.at the end pint the most 10 rated song...
thx :)
LATEST TUTORIALS
APPROVED BY CLIENTS