Fejlmelding i BlueJ
Hvad er der galt her: */ param String country, int weightFejlmeldingen lyder ";" */expected param string country, int weight
Her er hvad jeg skrevet indtil nu:
**
* Here we are going to calculate postage acorrding to country and weight.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Postage
{
// instance variables - replace the example below with your own
private String country;
private int weight;
private double price;
/**
* Constructor for objects of class Postage
*/ param String country, int weight
public Postage(String country, int weight)
{
// initialise instance variables
this.country = country;
this.weight = weight;
this.price = price;
}
/**
* Access method get
* return String country
*/
public String getCountry()
{
return country;
}
/**
* Access method
* return weight
*/
public int getWeight
{
return weight;
}
/**
* Access method
* return double price
*/
public double getprice
{
return price;
}
}