sello skhalo

Greenhorn
+ Follow
since Sep 08, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sello skhalo

yea but i dont know how to do it,i dnt knw where to find usecode tag
if you instruct me i can try
10 years ago
anyone who can help me please
10 years ago
ohk ive already installed the SQL
can anyone instruct me on how to create the database...
10 years ago
well am clues and dont knw where to start
how to start but as for the coding i can try them
10 years ago
OK, I need some help with this. I
have done something wrong here
and I have no idea how to fix it. I
am confused aoout the total price
of the whole thing and how to go
about coding it. Please take a look and let me what I need change to
get this thing to work... import javax.swing.*;
import java.awt.*;
import java.awt.event.*; public class JInsurance extends
JFrame implements ItemListener
{
int hmoPrice = 200, ppoPrice =
800;
int[] additPrice ={0,20,75}; int basePrice = 0, totalPrice =
basePrice; JCheckBox hmoBox = new
JCheckBox("HMO $" + hmoPrice,
false);
JCheckBox ppoBox = new
JCheckBox("PPO $" + ppoPrice,
false); JLabel additLabel = new JLabel
("Additional Coverage: Make a
selection");
String[] additNames = {"None $"
+ additPrice[0], "Vision $" +
additPrice[1], "Dental $" + additPrice[2]};
JComboBox additBox = new
JComboBox(additNames); JLabel insOptionsLabel = new
JLabel("Insurance Options:");
JTextField totPrice = new
JTextField(10);
JTextField message = new
JTextField(30); JLabel optionExplainLabel =
new JLabel("Base price for
insurance with HMO $" + basePrice
+ ".");
JLabel optionExplainLabel2 =
new JLabel("Optionally, you can choose HMO or PPO only"); public JInsurance()
{
super("Insurance Price
Estimator");
setDefaultCloseOperation
(JFrame.EXIT_ON_CLOSE); JPanel pane = new JPanel();
ButtonGroup insGroup = new
ButtonGroup();
insGroup.add(hmoBox);
insGroup.add(ppoBox);
pane.add(hmoBox); pane.add(ppoBox);
pane.add(additLabel);
pane.add(additBox);
pane.add(insOptionsLabel);
pane.add
(optionExplainLabel); pane.add
(optionExplainLabel2);
pane.add(totPrice);
pane.add(message);
totPrice.setText("$" +
totalPrice); hmoBox.addItemListener
(this);
ppoBox.addItemListener
(this);
additBox.addItemListener
(this); setContentPane(pane);
}
public static void main(String[]
args)
{
JFrame aFrame = new JInsurance();
aFrame.setSize(400,250);
aFrame.setVisible(true);
}
public void itemStateChanged
(ItemEvent event) {
Object source =
event.getSource();
int select =
event.getStateChange(); if(source == additBox)
{
int addNum =
additBox.getSelectedIndex();
addPrice = additPrice
[addNum]; message.setText("Action:
Insurance options changed $" +
addPrice + " added");
}
else
message.setText("Action: Insurance type changed");
totalPrice = basePrice
+additPrice;
if(ppoBox.isSelected())
totalPrice +=
ppoPrice; else if
(fishBox.isSelected())
totalPrice +=
fishPrice; }
}
10 years ago
those are the questions,need to come up with the codings
will you please help me with them

Thank you
10 years ago
Create a database named
MyCustomers, with the following
tables using
MySQL. Use the appropriate data types
and note that the underlined fields
denotes a field to be either a primary key or a foreign key Customers(CustomerID, Name,
Address, City) Orders(OrderID, CustomerID, Amount,
Date) Insert at least 5 records in each of the
tables appropriately. Include the
output for your database design and
the records for your tables.


Write a Java program to establish
a connection to the MyCustomers
database using the JDBC driver to
retrieve the entire Customers and
Orders
table. Use the Swing component TextArea to display the data and your
interface must use either menu items
or command buttons to trigger the
actions for retrieving the data.

Write a servlet program that searches
for a customer in the database you
designed in Question above. If the
customer is not in the database, add
the customer details to the database
and display the message “Customer is added to the database”. If the
customer is in the database, display
the
message “Already Existing Customer”
10 years ago
Write an application that allows the
user to choose insurance options in
JCheckBoxes. Use a ButtonGroup to
allow the user to select only one of
two
insurance types—HMO (health maintenance organization) or PPO
(preferred
provider organization). Use regular
(single) JCheckBoxes for dental
insurance and vision insurance
options; the user can select one option,
both options, or neither option. As
the user selects each option, display
its name and price in a text field; the
HMO costs R200 per month, the PPO
costs R600 per month, the dental coverage adds R75 per month, and
the
vision care adds R20 per month.
When a user deselects an item, make
the
text field blank. Save the file as JInsurance.java.
10 years ago