Need help - newbie

From: Chris Woods (chris_at_woods-family.org)
Date: 03/15/04


Date: 14 Mar 2004 20:47:19 -0800

I having problems with the my code, I am getting the following error:
----------
C:\Documents and Settings\Chris Woods\My
Documents\ICS140\Lab5\MovieTester.java:10: cannot resolve symbol
symbol : constructor Movie ()
location: class Movie
                Movie nMovie = new Movie();
                               ^
1 error

Tool completed with exit code 1

---------
public class Movie
{
        // DATA FIELDS
                private String name;
                private String type;
                private int length;
                private double productionCost;

        // METHODS
                public Movie(String name, String type, int length, double
productionCost)
                {
                        this.name = name;
                        this.type = type;
                        this.length = length;
                        this.productionCost = productionCost;

                }

                public String getName()
                {
                        return name;
                }

                public String getType()
                {
                        return type;
                }

                public void setLength(int len)
                {
                        length = len;
                }

                public void setProductionCost(double prod)
                {
                        productionCost = prod;
                }

                public String toString()
                {
                        return "Name " + name + " Genre " + type + " Length " + length +
"min" + " Production Cost: " + productionCost;
                }
}
----------
import javax.swing.*;

public class MovieTester

{
        public static void main(String[] args)
        {
                Movie nMovie = new Movie();

                        String name = JOptionPane.showInputDialog("Movie Title");
                        nMovie.getName();

                        String type = JOptionPane.showInputDialog("Genre");
                        nMovie.getType();

                        String numStr = JOptionPane.showInputDialog("Length in minutes");
                        int num = Integer.parseInt(numStr);
                        nMovie.setLength(num);

                        numStr = JOptionPane.showInputDialog("Production Cost");
                        double num1 = Double.parseDouble(numStr);
                        nMovie.setProductionCost(num1);

                        JOptionPane.showMessageDialog(null, nMovie.toString());
        }
}