Swing/JDBC problem (edited message)
hello.
my name is james mcfadden. this is the same message as the last one called Swing/JDBC problem. i just made a little mistake when i was typing in the original message. i have developed a video library system. i have problems compiling the main program, which is called Demo.java. would you know what is causing these errors, and how should i correct them?
the errors as well as the code are shown below.
-jGRASP exec: javac -g X:\CP4B Project\Demo.java
ProductForm.java:57: int cannot be dereferenced
productNumber=Integer.parseInt(""+productNumber.getText());
^
ProductForm.java:58: setProductNumber(int) in Product cannot be applied to (java.lang.String)
p.setProductNumber(txtFlds[0].getText());
^
ProductForm.java:59: int cannot be dereferenced
productNumber = Integer.parseInt(productNumber.getText());
^
ProductForm.java:61: float cannot be dereferenced
rentalPrice=Float.parseFloat(""+rentalPrice.getText());
^
ProductForm.java:62: setRentalPrice(float) in Product cannot be applied to (java.lang.String)
p.setRentalPrice(txtFlds[2].getText());
^
ProductForm.java:63: float cannot be dereferenced
rentalPrice = Float.parseFloat(rentalPrice.getText());
^
ProductForm.java:66: int cannot be dereferenced
year=Integer.parseInt(""+year.getText());
^
ProductForm.java:67: setYear(int) in Product cannot be applied to (java.lang.String)
p.setYear(txtFlds[5].getText());
^
ProductForm.java:68: int cannot be dereferenced
year = Integer.parseInt(year.getText());
^
Member.java:8: cannot find symbol
symbol : class Date
location: class Member
Date dateOfBirth;
^
Member.java:9: cannot find symbol
symbol : class Date
location: class Member
Date dateRegistered;
^
Member.java:36: cannot find symbol
symbol : class Date
location: class Member
public void setDateOfBirth(Date m){
^
Member.java:40: cannot find symbol
symbol : class Date
location: class Member
public void setDateRegistered(Date n){
^
Member.java:69: cannot find symbol
symbol : class Date
location: class Member
public Date getDateOfBirth(){
^
Member.java:73: cannot find symbol
symbol : class Date
location: class Member
public Date getDateRegistered(){
^
MemberForm.java:59: int cannot be dereferenced
memberNumber=Integer.parseInt(""+memberNumber.getText());
^
MemberForm.java:60: setMemberNumber(int) in Member cannot be applied to (java.lang.String)
m.setMemberNumber(txtFlds[0].getText());
^
MemberForm.java:61: int cannot be dereferenced
memberNumber = Integer.parseInt(memberNumber.getText());
^
Rental.java:7: cannot find symbol
symbol : class Date
location: class Rental
Date rentalDate;
^
Rental.java:8: cannot find symbol
symbol : class Date
location: class Rental
Date returnDate;
^
Rental.java:33: cannot find symbol
symbol : class Date
location: class Rental
public void setRentalDate(Date o){
^
Rental.java:37: cannot find symbol
symbol : class Date
location: class Rental
public void setReturnDate(Date p){
^
Rental.java:70: cannot find symbol
symbol : class Date
location: class Rental
public Date getRentalDate(){
^
Rental.java:74: cannot find symbol
symbol : class Date
location: class Rental
public Date getReturnDate(){
^
RentalForm.java:60: int cannot be dereferenced
productNumber=Integer.parseInt(""+productNumber.getText());
^
RentalForm.java:61: setProductNumber(int) in Rental cannot be applied to (java.lang.String)
r.setProductNumber(txtFlds[0].getText());
^
RentalForm.java:62: int cannot be dereferenced
productNumber = Integer.parseInt(productNumber.getText());
^
RentalForm.java:64: int cannot be dereferenced
memberNumber=Integer.parseInt(""+memberNumber.getText());
^
RentalForm.java:65: setMemberNumber(int) in Rental cannot be applied to (java.lang.String)
r.setMemberNumber(txtFlds[2].getText());
^
RentalForm.java:66: int cannot be dereferenced
memberNumber = Integer.parseInt(memberNumber.getText());
^
RentalForm.java:72: float cannot be dereferenced
fine=Float.parseFloat(""+fine.getText());
^
RentalForm.java:73: setFine(float) in Rental cannot be applied to (java.lang.String)
r.setFine(txtFlds[8].getText());
^
RentalForm.java:74: float cannot be dereferenced
fine = Float.parseFloat(fine.getText());
^
RentalForm.java:85: cannot find symbol
symbol: variable address
stmt.executeUpdate("update rental set lastName= "+lastName+"address= "+address+"where memberNumber= "+memberNumber);
^
34 errors
-jGRASP wedge2: exit code for process is 1.
-jGRASP: operation complete.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.JOptionPane;
import java.sql.*;
/*
import java.awt.BorderLayout;
import java.awt.Component;
import java.io.IOException;
import java.net.URL;
import javax.media.CannotRealizeException;
import javax.media.Manager;
import javax.media.NoPlayerException;
import javax.media.Player;
import javax.swing.JPanel;
import java.io.File;
import java.net.MalformedURLException;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
*/
public class Demo extends JFrame{
static String url="jdbc:odbc:VideoLibrary";
static Statement stmt;
static Connection con;
JTextField hostField;
JTextField queryField;
QueryTableModel qtm;
JComboBox comboBox;
public static void main(String[] args){
int choice=-1;
do{
choice=getChoice();
if(choice!=0){
getSelected(choice);
}//end if
}while(choice!=16);//end do-while
System.exit(0);//closes down the menu screen
/*
//create a file chooser
JFileChooser fileChooser=new JFileChooser();
//show open file dialog
int result=fileChooser.showOpenDialog( null );
if(result==JFileChooser.APPROVE_OPTION){//user chose a file
URL mediaURL=null;
try{
//get the file as URL
mediaURL=fileChooser.getSelectedFile().toURL();
}//end try
catch(MalformedURLException malformedURLException){
System.err.println("Could not create URL for the file");
} // end catch
if(mediaURL!=null){//only display if there is a valid URL
JFrame mediaTest=new JFrame("Media Tester");
mediaTest.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mediaTest.add(mediaPanel);
mediaTest.setSize(300,300);
mediaTest.setVisible(true);
}//end inner if
}//end outer if
*/
}//end main
public static int getChoice(){
String choice;//a variable of type string
int ch;//a variable of type int
choice=JOptionPane.showInputDialog(null,"1.Add product details\n"+"2.Add member details\n"+"3.Add rental details\n"+"4.Edit product details\n"+"5.Edit member details\n"+"6.Edit rental details\n"+"7.Delete product details\n"+"8.Delete member details\n"+"9.Delete rental details\n"+"10. View product details\n"+"11. View member details\n"+"12. View rental details\n"+"13. Hear sound clips\n"+"14. View movie previews\n"+"15. View game previews\n"+"16. Log Off\n\n"+"Enter your choice");//asks the user for some input
ch=Integer.parseInt(choice);//a class that wraps a value of the primitive type int in an object
return ch;//a method that returns an integer value
}//end getChoice
public static void getSelected(int choice){
if(choice==1){
insertProducts();
}//end if
if(choice==2){
insertMembers();
}//end if
if(choice==3){
insertRentals();
}//end if
if(choice==4){
editProducts();
}//end if
if(choice==5){
editMembers();
}//end if
if(choice==6){
editRentals();
}//end if
if(choice==7){
deleteProducts();
}//end if
if(choice==8){
deleteMembers();
}//end if
if(choice==9){
deleteRentals();
}//end if
if(choice==10){
viewProducts();
}//end if
if(choice==11){
viewMembers();
}//end if
if(choice==12){
viewRentals();
}//end if
if(choice==13){
//hearSongs();
}//end if
if(choice==14){
//viewMovies();
}//end if
if(choice==15){
//viewGames();
}//end if
}//end getSelected
public static Connection getConnection(){
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}//end try
catch(java.lang.ClassNotFoundException e){
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}//end catch
try{
con=DriverManager.getConnection(url,"","");
}//end try
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}//end catch
return con;
}//end getConnection
public static void insertProducts(){
ProductForm product=new ProductForm();
}
public static void insertMembers(){
MemberForm member=new MemberForm();
}
public static void insertRentals(){
RentalForm rental=new RentalForm();
}
public static void editProducts(){
ProductForm product=new ProductForm();
}
public static void editMembers(){
MemberForm member=new MemberForm();
}
public static void editRentals(){
RentalForm rental=new RentalForm();
}
public static void deleteProducts(){
ProductForm product=new ProductForm();
}
public static void deleteMembers(){
MemberForm member=new MemberForm();
}
public static void deleteRentals(){
RentalForm rental=new RentalForm();
}
public static void viewProducts(){
Demo test = new Demo();//invokes the constructor Demo()
test.setVisible(true);//shows the JTable component by marking it as visible
}
public static void viewMembers(){
Demo test = new Demo();//invokes the constructor Demo()
test.setVisible(true);//shows the JTable component by marking it as visible
}
public static void viewRentals(){
Demo test = new Demo();//invokes the constructor Demo()
test.setVisible(true);//shows the JTable component by marking it as visible
}
public static void hearSongs(){
//Demo mediaPanel=new Demo(mediaURL);
}
public static void viewMovies(){
//Demo mediaPanel=new Demo(mediaURL);
}
public static void viewGames(){
//Demo mediaPanel=new Demo(mediaURL);
}
public Demo(){//a constructor
super("Demo Test Frame");//overrides the constructor
setSize(350, 200);
comboBox = new JComboBox();//invokes the class JComboBox
comboBox.addItem("jdbc:odbc:VideoLibrary");
qtm = new QueryTableModel();//invokes the class QueryTableModel
JTable table = new JTable(qtm);
JScrollPane scrollpane = new JScrollPane(table);
JPanel p1 = new JPanel();
p1.setLayout(new GridLayout(3, 2));
p1.add(comboBox);
p1.add(new JLabel("Enter your query: "));
p1.add(queryField = new JTextField());
p1.add(new JLabel("Click here to send: "));
JButton jb = new JButton("Search");
jb.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
qtm.setHostURL();//invokes the method setHostURL
qtm.setQuery(queryField.getText().trim());
}
} );//end addActionListener
p1.add(jb);
getContentPane().add(p1, BorderLayout.NORTH);
getContentPane().add(scrollpane, BorderLayout.CENTER);//Returns the content pane
}//end Demo
/*
public Demo(URL mediaURL){
setLayout(new BorderLayout());//use a BorderLayout
//Use lightweight components for Swing compatibility
Manager.setHint(Manager.LIGHTWEIGHT_RENDERER,true);
try{
//create a player to play the media specified in the URL
Player mediaPlayer=Manager.createRealizedPlayer(mediaURL);
//get the components for the video and the playback controls
Component video=mediaPlayer.getVisualComponent();
Component controls=mediaPlayer.getControlPanelComponent();
if(video!=null)
add(video,BorderLayout.CENTER);//add video component
if(controls!=null)
add(controls,BorderLayout.SOUTH);//add controls
mediaPlayer.start();//start playing the media clip
}//end try
catch(NoPlayerException noPlayerException){
System.err.println("No media player found");
}//end catch
catch(CannotRealizeException cannotRealizeException){
System.err.println("Could not realize media player");
}//end catch
catch(IOException iOException){
System.err.println("Error reading from the source");
}//end catch
}//end Demo
*/
}//end class Demo
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
public class ProductForm extends JFrame{
JPanel pnlTitle,pnlBody,pnlFooter;
JButton btnDBAdd=new JButton("Add");
JButton btnDBEdit=new JButton("Edit");
JButton btnDBDelete=new JButton("Delete");
JLabel[] lblForm=new JLabel[14];
JLabel lblTitle=new JLabel("Product Form");
JTextField[] txtFlds=new JTextField[60];
String[] listFormNames={"Product Number","Name","Rental Price","Age Category","Type","Year"};
Container contentpane;
String url="jdbc:odbc:VideoLibrary";
Connection con=null;
//Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//con=DriverManager.getConnection(url,"","");
int productNumber;
String name;
float rentalPrice;
String ageCategory;
String type;
int year;
public ProductForm(){
super("Product");
contentpane=getContentPane();
contentpane.setLayout(new BorderLayout());
pnlTitle=new JPanel();
pnlBody=new JPanel();
pnlFooter=new JPanel();
pnlBody.setLayout(new GridLayout(listFormNames.length,2,20,20));
for(int i=0;i<listFormNames.length;i++){
System.out.println(listFormNames);
lblForm=new JLabel(listFormNames);
pnlBody.add(lblForm);
txtFlds=new JTextField(25);
pnlBody.add(txtFlds);
}
lblTitle.setForeground(Color.RED);
pnlTitle.add(lblTitle);
pnlFooter.add(btnDBAdd);
pnlFooter.add(btnDBEdit);
pnlFooter.add(btnDBDelete);
contentpane.add(pnlTitle,BorderLayout.NORTH);
contentpane.add(pnlBody,BorderLayout.CENTER);
contentpane.add(pnlFooter,BorderLayout.SOUTH);
pack();
setVisible(true);
final Statement stmt=con.createStatement();
Product p=new Product();
productNumber=Integer.parseInt(""+productNumber.getText());
p.setProductNumber(txtFlds[0].getText());
productNumber = Integer.parseInt(productNumber.getText());
p.setName(txtFlds[1].getText());
rentalPrice=Float.parseFloat(""+rentalPrice.getText());
p.setRentalPrice(txtFlds[2].getText());
rentalPrice = Float.parseFloat(rentalPrice.getText());
p.setAgeCategory(txtFlds[3].getText());
p.setType(txtFlds[4].getText());
year=Integer.parseInt(""+year.getText());
p.setYear(txtFlds[5].getText());
year = Integer.parseInt(year.getText());
btnDBAdd.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
stmt.executeUpdate("insert into product (productNumber,name,rentalPrice,ageCategory,type,year)"+"values("+productNumber+name+rentalPrice+ageCategory+type+year+")" );
}
});
btnDBEdit.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
stmt.executeUpdate("update product set name= "+name+"where productNumber= "+productNumber);
}
});
btnDBDelete.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
stmt.executeUpdate("delete * from product");
}
});
stmt.close();
con.close();
}
public static void main(String[] args){
ProductForm test=new ProductForm();
test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
public class MemberForm extends JFrame{
JPanel pnlTitle,pnlBody,pnlFooter;
JButton btnDBAdd=new JButton("Add");
JButton btnDBEdit=new JButton("Edit");
JButton btnDBDelete=new JButton("Delete");
JLabel[] lblForm=new JLabel[19];
JLabel lblTitle=new JLabel("Member Form");
JTextField[] txtFlds=new JTextField[70];
String[] listFormNames={"Member Number","First Name","Last Name","Address","Phone Number","Mobile Phone Number","Date of Birth","Date Registered"};
Container contentpane;
String url="jdbc:odbc:VideoLibrary";
Connection con=null;
//Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//con=DriverManager.getConnection(url,"","");
int memberNumber;
String firstName;
String lastName;
String address;
String phoneNumber;
String mobilePhoneNumber;
Date dateOfBirth;
Date dateRegistered;
public MemberForm(){
super("Member");
contentpane=getContentPane();
contentpane.setLayout(new BorderLayout());
pnlTitle=new JPanel();
pnlBody=new JPanel();
pnlFooter=new JPanel();
pnlBody.setLayout(new GridLayout(listFormNames.length,2,20,20));
for(int i=0;i<listFormNames.length;i++){
System.out.println(listFormNames);
lblForm=new JLabel(listFormNames);
pnlBody.add(lblForm);
txtFlds=new JTextField(25);
pnlBody.add(txtFlds);
}
lblTitle.setForeground(Color.RED);
pnlTitle.add(lblTitle);
pnlFooter.add(btnDBAdd);
pnlFooter.add(btnDBEdit);
pnlFooter.add(btnDBDelete);
contentpane.add(pnlTitle,BorderLayout.NORTH);
contentpane.add(pnlBody,BorderLayout.CENTER);
contentpane.add(pnlFooter,BorderLayout.SOUTH);
pack();
setVisible(true);
final Statement stmt=con.createStatement();
Member m=new Member();
memberNumber=Integer.parseInt(""+memberNumber.getText());
m.setMemberNumber(txtFlds[0].getText());
memberNumber = Integer.parseInt(memberNumber.getText());
m.setFirstName(txtFlds[1].getText());
m.setLastName(txtFlds[2].getText());
m.setAddress(txtFlds[3].getText());
m.setPhoneNumber(txtFlds[4].getText());
m.setMobilePhoneNumber(txtFlds[5].getText());
m.setDateOfBirth(txtFlds[6].getText());
m.setDateRegistered(txtFlds[7].getText());
btnDBAdd.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
stmt.executeUpdate("insert into member (memberNumber,firstName,lastName,address,phoneNumber,mobilePhoneNumber,dateOfBirth,dateRegistered)"+"values("+memberNumber+firstName+lastName+address+phoneNumber+mobilePhoneNumber+dateOfBirth+dateRegistered+")" );
}
});
btnDBEdit.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
stmt.executeUpdate("update member set lastName= "+lastName+"address= "+address+"where memberNumber= "+memberNumber);
}
});
btnDBDelete.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
stmt.executeUpdate("delete * from member");
}
});
stmt.close();
con.close();
}
public static void main(String[] args){
MemberForm test=new MemberForm();
test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
public class RentalForm extends JFrame{
JPanel pnlTitle,pnlBody,pnlFooter;
JButton btnDBAdd=new JButton("Add");
JButton btnDBEdit=new JButton("Edit");
JButton btnDBDelete=new JButton("Delete");
JLabel[] lblForm=new JLabel[16];
JLabel lblTitle=new JLabel("Rental Form");
JTextField[] txtFlds=new JTextField[60];
String[] listFormNames={"Product Number","Name","Member Number","First Name","Last Name","Rental Date","Return Date","Overdue Reminder","Fine"};
Container contentpane;
String url="jdbc:odbc:VideoLibrary";
Connection con=null;
//Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//con=DriverManager.getConnection(url,"","");
int productNumber;
String name;
int memberNumber;
String firstName;
String lastName;
Date rentalDate;
Date returnDate;
String overdueReminder;
float fine;
public RentalForm(){
super("Rental");
contentpane=getContentPane();
contentpane.setLayout(new BorderLayout());
pnlTitle=new JPanel();
pnlBody=new JPanel();
pnlFooter=new JPanel();
pnlBody.setLayout(new GridLayout(listFormNames.length,2,20,20));
for(int i=0;i<listFormNames.length;i++){
System.out.println(listFormNames);
lblForm=new JLabel(listFormNames);
pnlBody.add(lblForm);
txtFlds=new JTextField(25);
pnlBody.add(txtFlds);
}
lblTitle.setForeground(Color.RED);
pnlTitle.add(lblTitle);
pnlFooter.add(btnDBAdd);
pnlFooter.add(btnDBEdit);
pnlFooter.add(btnDBDelete);
contentpane.add(pnlTitle,BorderLayout.NORTH);
contentpane.add(pnlBody,BorderLayout.CENTER);
contentpane.add(pnlFooter,BorderLayout.SOUTH);
pack();
setVisible(true);
final Statement stmt=con.createStatement();
Rental r=new Rental();
productNumber=Integer.parseInt(""+productNumber.getText());
r.setProductNumber(txtFlds[0].getText());
productNumber = Integer.parseInt(productNumber.getText());
r.setName(txtFlds[1].getText());
memberNumber=Integer.parseInt(""+memberNumber.getText());
r.setMemberNumber(txtFlds[2].getText());
memberNumber = Integer.parseInt(memberNumber.getText());
r.setFirstName(txtFlds[3].getText());
r.setLastName(txtFlds[4].getText());
r.setRentalDate(txtFlds[5].getText());
r.setReturnDate(txtFlds[6].getText());
r.setOverdueReminder(txtFlds[7].getText());
fine=Float.parseFloat(""+fine.getText());
r.setFine(txtFlds[8].getText());
fine = Float.parseFloat(fine.getText());
btnDBAdd.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
stmt.executeUpdate("insert into rental (productNumber,name,memberNumber,firstName,lastName,rentalDate,returnDate,overdueReminder,fine)"+"values("+productNumber+name+memberNumber+firstName+lastName+rentalDate+returnDate+overdueReminder+fine+")");
}
});
btnDBEdit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
stmt.executeUpdate("update rental set lastName= "+lastName+"address= "+address+"where memberNumber= "+memberNumber);
}
});
btnDBDelete.addActionListener(new ActionListener() {
public final void actionPerformed(ActionEvent e) {
stmt.executeUpdate("delete * from rental");
}
});
stmt.close();
con.close();
}
public static void main(String[] args){
RentalForm test=new RentalForm();
test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
public class Product{
int productNumber;
String name;
float rentalPrice;
String ageCategory;
String type;
int year;
//setters
public void setProductNumber(int a){
this.productNumber = a;
}
public void setName(String b){
this.name = b;
}
public void setRentalPrice(float c){
this.rentalPrice = c;
}
public void setAgeCategory(String d){
this.ageCategory = d;
}
public void setType(String e){
this.type = e;
}
public void setYear(int f){
this.year = f;
}
//getters
public int getProductNumber(){
return this.productNumber;
}
public String getName(){
return this.name;
}
public float getRentalPrice(){
return this.rentalPrice;
}
public String getAgeCategory(){
return this.ageCategory;
}
public String getType(){
return this.type;
}
public int getYear(){
return this.year;
}
}
public class Member{
int memberNumber;
String firstName;
String lastName;
String address;
String phoneNumber;
String mobilePhoneNumber;
Date dateOfBirth;
Date dateRegistered;
//setters
public void setMemberNumber(int g){
this.memberNumber = g;
}
public void setFirstName(String h){
this.firstName = h;
}
public void setLastName(String i){
this.lastName = i;
}
public void setAddress(String j){
this.address = j;
}
public void setPhoneNumber(String k){
this.phoneNumber = k;
}
public void setMobilePhoneNumber(String l){
this.mobilePhoneNumber = l;
}
public void setDateOfBirth(Date m){
this.dateOfBirth = m;
}
public void setDateRegistered(Date n){
this.dateRegistered = n;
}
//getters
public int getMemberNumber(){
return this.memberNumber;
}
public String getFirstName(){
return this.firstName;
}
public String getLastName(){
return this.lastName;
}
public String getAddress(){
return this.address;
}
public String getPhoneNumber(){
return this.phoneNumber;
}
public String getMobilePhoneNumber(){
return this.mobilePhoneNumber;
}
public Date getDateOfBirth(){
return this.dateOfBirth;
}
public Date getDateRegistered(){
return this.dateRegistered;
}
}
public class Rental{
int productNumber;
String name;
int memberNumber;
String firstName;
String lastName;
Date rentalDate;
Date returnDate;
String overdueReminder;
float fine;
//setters
public void setProductNumber(int a){
this.productNumber = a;
}
public void setName(String b){
this.name = b;
}
public void setMemberNumber(int g){
this.memberNumber = g;
}
public void setFirstName(String h){
this.firstName = h;
}
public void setLastName(String i){
this.lastName = i;
}
public void setRentalDate(Date o){
this.rentalDate = o;
}
public void setReturnDate(Date p){
this.returnDate = p;
}
public void setOverdueReminder(String q){
this.overdueReminder = q;
}
public void setFine(float r){
this.fine = r;
}
//getters
public int getProductNumber(){
return this.productNumber;
}
public String getName(){
return this.name;
}
public int getMemberNumber(){
return this.memberNumber;
}
public String getFirstName(){
return this.firstName;
}
public String getLastName(){
return this.lastName;
}
public Date getRentalDate(){
return this.rentalDate;
}
public Date getReturnDate(){
return this.returnDate;
}
public String getOverdueReminder(){
return this.overdueReminder;
}
public float getFine(){
return this.fine;
}
}>

