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

Help me with my code so if the tortilla chips is checked it should display its extras cost and description.

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

class MyProgram extends JFrame implements ActionListener{
public JCheckBox bp,tchips,csoup,cpasta,
gbread;
public JTextField itemcost;
public JTextArea itemdesc;
public JLabel idesc,icost,extras;
public MyProgram(){
Container pane=getContentPane();
pane.setLayout(null);

pane.add(extras=new JLabel("Extras"));
extras.setBounds(34,50,70,20);
pane.add(bp=new JCheckBox("Baked Potato"));
bp.setBounds(30,80,150,20);
bp.setOpaque(false);
//baked potato description: oven baked potato halves
//item cost: $4.00
pane.add(tchips=new JCheckBox("Tortilla Chips"));
tchips.setBounds(30,110,150,20);
tchips.setOpaque(false);
//Tortilla Chips description: light & crispy corn chips
//item cost: $10.90

pane.add(csoup=new JCheckBox("Chicken Soup"));
csoup.setBounds(30,140,150,20);
csoup.setOpaque(false);
//chicken soup description: with
"Write a program that plays a word game with the user. The program should ask the user to enter the following:

His/her Name

His/her Age

Name of a City

Name of a College

A Profession

A Type of Animal

A Pet's Name

After the user has entered these items, the program shoulld display the following story, inserting the user's input into the appropriate locations:

There once was a person named NAME who lived in CITY. At the age of AGE, NAME went to college at COLLEGE. NAME graduated and went to work as a PROFESSION. Then, NAME adopted a(n) ANIMAL named PETNAME. They both lived happily every after!
Create an interface named Comparison whose method can be used to compare two Time object. The Method will include isGreater,isLess,and is Equal.
Some while ago, the European Union decreed that all traders in in the UK sell their goods by the kilo and not by the pound (1 kilo = 2.2 pounds). The following pseudo code has been arrived at in order to carry out this conversion:
BEGIN
DISPLY prompt for value in pounds
ENTER value to old value + 2.2
DISPLAY value in kilos
END

Implement this program, remembering to declare any variables that are necessary.

JAVA programming
A group of students have been told to get into teams of a specific size for their class work. design and implement a program that prompts for the number of students in the group and the size of the teams to be formed, and display how many teams can be formed and how many students are left without a team.
how to call getters and setters method if they are set using swing and if the user's entry will store on an array type and the user is allowed to enter data
Write a program to print the pay slip for each employee. Your program must use the properties of object-oriented programming which are polymorphism and inheritance in constructing the classes for the employees. Your program must have a menu that gives the user an option whether to process the pay slip for part time or full time employee. For a part time employee, the input will be hours worked, hourly rate and sales achieved, and for full time employee, it will be overtime rate, overtime hours worked and sales achieved. Assume the basic pay for full time is $2000.

Below is the commission rate for the sales achieved.

$250 - $600 = 2%
$601 - $900 = 4%
Over $900 = 6%
In a new role-playing fantasy game players must design their character by picking a point value for each of three characteristics:
• Strength, from 1 to 10
• Health, from 1 to 10
• Luck, from 1 to 10
Write a program that asks for a name for the character and asks for the point value of for each of the three characteristics. However, the total points must be less than 15. If the total exceeds 15, then 5 points are assigned to each characteristic
Welcome to Jack Bagbaga’s Quest
Enter the name of your character: Chortle
Enter strength (1-10): 8
Enter health (1-10): 4
Enter luck (1-10): 6

You have give your character too many points! Default values have been assigned:
Chortle, strength: 5, health: 5, luck: 5
Write a program that calculates the annual cost of running an appliance. The program will ask the user for the cost per kilowatt-hour and the number of kilowatt-hours the appliance uses in a year:
Enter cost per kilowatt-hour in cents: 8.42
Enter kilowatt-hours used per year : 653
Annual cost: 54.9826
write a program where the user will input their respective subject and grades after that it will compute and display their gwa(general average).
LATEST TUTORIALS
APPROVED BY CLIENTS