Hey everyone,
Alright, my project requires that I write a program to demonstrate my understanding of class inheritance. Problem is the teacher wants us to use Java, something I have never used and the teacher did not even give us a crash course in. Right now I am trying to compile this file (Publication.java) which contains the super class. I get errors saying the strings are unrecognizable symbols. This is probably pretty simple so could anyone tell me what is wrong?
public class Publication
{
// Constructors
public Publication ()
{title = ""; medium = ""; copies = 0;}
public Publication (string name, string type) // Yields an error on this line
{title = name; medium = type; copies = 0;}
// Methods
public int copiesprinted () {return copies;}
public void incrementcopies () {copies++;}
// Data
private string title, medium;
private int copies;
}