-
Why does this not compile?
Can some please help me find out why this does not compile, please
public abstract class buyer{
//instance variables
private String buyerName;
private String buyerAddress;
private Integer perviousPurchases;
//constructor
public Buyer (String input Name, String input Address, integer input previous purchases)
{
buyerName = inputName;
buyerAddress = inputaddress;
perviousPurchases = input previouspurchases;
}
//The next 3 methods are ACCESSOR methods
public String getName(){
return buyerName;
}
public String getAddress(){
return buyerAddress;
}
public double get previouspurchases (){
return perviousPurchases;
}
//The next 3 methods are SETTING methods
public void setName(String newName){
buyerName = newName;
}
public void setAddress (String newAddress){
buyerAddress = newAddress;
}
public void set perviousPurchases (integer new perviousPurchases){
perviousPurchases = new perviousPurchases;
}
//other methods
public double calculateDiscount(int carsToBePurchased)
// will be used to calculate discount
public Boolean equals( input test)
{
if this.name = input name; &
if this.address = input address;
result= true;
return result
}
public void showDetails(){
System.out.println("buyer Name is : " + this.getbuyerName() );
System.out.println("buyer address is : " + this.getbuyeraddress() );
}
}//End of class definition
-
How java can compile your program when a program
still has a lot of syntax error EX:
String input Name, String input Address, integer input previous purchases
Similar Threads
-
Replies: 4
Last Post: 02-09-2006, 07:53 AM
-
Replies: 7
Last Post: 11-30-2005, 09:49 AM
-
Replies: 0
Last Post: 01-27-2001, 03:29 PM
-
Replies: 1
Last Post: 01-27-2001, 03:04 PM
-
Replies: 2
Last Post: 11-02-2000, 07:06 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|