//My name is rajeshwari and i have posted u a simple Bank program
import java.awt.*;
import java.awt.event.*;
public class MyBank implements ActionListener,ItemListener
{
Frame f1;
CheckboxGroup cg1;
Checkbox ch1,ch2,ch3,ch4,ch5,ch6;
Label l1,l2,l3,l4,l5;
TextField t1,t2,t3,t4;
Button b1,b2,b3;
Font ft;
MyBank()
{
f1 = new Frame("My Bank");
f1.setBounds(50,50,500,500);
f1.setLayout(null);
cg1 = new CheckboxGroup();
ch1 = new Checkbox("Short term[1yr]",cg1,false);
ch1.setBounds(50,50,120,30);
ch1.addItemListener(this);
ch2 = new Checkbox("Medium term[2yrs]",cg1,false);
ch2.setBounds(50,100,120,30);
ch2.addItemListener(this);
ch3 = new Checkbox("Long term[5yrs]",cg1,false);
ch3.setBounds(50,150,120,30);
ch3.addItemListener(this);
ch4 = new Checkbox("Very long term[10yrs]",cg1,false);
ch4.setBounds(50,200,120,30);
ch4.addItemListener(this);
l1 = new Label("Rate of Interest");
l1.setBounds(210,50,150,30);
t1 = new TextField();
t1.setBounds(360,50,100,30);
l2 = new Label("Deposit Amount");
l2.setBounds(210,125,150,30);
t2 = new TextField();
t2.setBounds(360,125,100,30);
l3 = new Label("Interest Amount");
l3.setBounds(210,200,150,30);
t3 = new TextField();
t3.setBounds(360,200,100,30);
l4 = new Label("Maturity Amount");
l4.setBounds(210,275,150,30);
t4 = new TextField();
t4.setBounds(360,275,100,30);
ch5 = new Checkbox("Senior Citizens");
ch5.setBounds(125,320,100,30);
ch5.addItemListener(this);
ch6 = new Checkbox("NRI");
ch6.setBounds(275,320,100,30);
ch6.addItemListener(this);
l5 = new Label("Extra : 0.5 Rate of Interest on Sr.Citizens and 1 Rate of Interest on NRI");
l5.setBounds(50,370,400,30);
b1 = new Button("Calc");
b1.setBounds(125,440,50,30);
b1.addActionListener(this);
b2 = new Button("Clear");
b2.setBounds(225,440,50,30);
b2.addActionListener(this);
b3 = new Button("Exit");
b3.setBounds(325,440,50,30);
b3.addActionListener(this);
f1.addWindowListener(new mywin());
ft=new Font("Arial",Font.ITALIC,20);
f1.add(ch1);
f1.add(ch2);
f1.add(ch3);
f1.add(ch4);
f1.add(l1);
f1.add(t1);
f1.add(l2);
f1.add(t2);
f1.add(l3);
f1.add(t3);
f1.add(l4);
f1.add(t4);
f1.add(ch5);
f1.add(ch6);
f1.add(l5);
f1.add(b1);
f1.add(b2);
f1.add(b3);
f1.setVisible(true);
}
public class mywin extends WindowAdapter
{
public void windowClosing(WindowEvent we)
{
System.exit(0);
}
}
public void itemStateChanged(ItemEvent ie)
{
double r;
try{
if(ch1.getState() == true)
{
t1.setText("3.5");
}
else if(ch2.getState() == true)
{
t1.setText("4");
}
else if(ch3.getState() == true)
{
t1.setText("4.5");
}
else if(ch4.getState() == true)
{
t1.setText("5");
}
if(ch5.getState() == true)
{
r = 0.5 + Double.parseDouble(t1.getText());
t1.setText(r+"");
}
if(ch6.getState() == true)
{
r = 1 + Double.parseDouble(t1.getText());
t1.setText(r+"");
}
}catch(Exception e){
System.out.println(e);
}
}
public void actionPerformed(ActionEvent ae)
{
double ri,damt,in,mamt;
if(ae.getSource() == b1)
{
ri = Double.parseDouble(t1.getText());
damt = Double.parseDouble(t2.getText());
in = (damt * ri) / 100;
mamt = damt + in;
t3.setText(in+"");
t4.setText(mamt+"");
}
else if(ae.getSource() == b2)
{
t1.setText("");
t2.setText("");
t3.setText("");
t4.setText("");
ch5.setState(false);
ch6.setState(false);
}
else if(ae.getSource() == b3)
{
System.exit(0);
}
}
public static void main(String args[])
{
MyBank obj = new MyBank();
}
}
P0010....'A' Camshaft Position Actuator Circuit (Bank 1)
P0011....'A' Camshaft Position - Timing Over-Advanced or System Performance (Bank 1)
P0012....'A' Camshaft Position - Timing Over-Retarded (Bank 1)
P0013....'B' Camshaft Position - Actuator Circuit (Bank 1)
P0014....'B' Camshaft Position - Timing Over-Advanced or System Performance (Bank 1)
P0015....'B' Camshaft Position -Timing Over-Retarded (Bank 1)
P0020....'A' Camshaft Position Actuator Circuit (Bank 2)
P0021....'A' Camshaft Position - Timing Over-Advanced or System Performance (Bank 2)
P0022....'A' Camshaft Position - Timing Over-Retarded (Bank 2)
P0023....'B' Camshaft Position - Actuator Circuit (Bank 2)
P0024....'B' Camshaft Position - Timing Over-Advanced or System Performance (Bank 2)
P0025....'B' Camshaft Position - Timing Over-Retarded (Bank 2)
I think your sensors are pattern parts and the readings /resistances are not the same as the original parts ,try some bosch units is my first suggestion ,
457 views
Usually answered in minutes!
×