I don't think this qualifies as cheating on homework.

I am making a Java applet that will input the name of a teacher at our school and output their schedule. When I say schedule, I mean the times they teach and what classes they teach, and where they teach them. I wanted to have 2 classes: a Teacher class and a Course class. Ideally, I'd like to store two giant CSV files on the server alongside the class files that I would be able to import into the applet to make a giant array/arraylist of Courses and Teachers rather than say, hard coding the array into the applet.

This is how I planned to make my constructors:

public class Teacher{
    public Teacher(String sLastName, String sFirstName, int nBlock1, int nBlock2,...int nBlock8){
    }
}

public class Course{
    public Course(int nCourseNumber, String sName, boolean bLong){
    }
}

I don't know how to do file input/output though. Everything I see on Google is for client file input, but all I want to do is import some data from the server. How do I do this?

I don't think this qualifies as cheating on homework.

I am making a Java applet that will input the name of a teacher at our school and output their schedule. When I say schedule, I mean the times they teach and what classes they teach, and where they teach them. I wanted to have 2 classes: a Teacher class and a Course class. Ideally, I'd like to store two giant CSV files on the server alongside the class files that I would be able to import into the applet to make a giant array/arraylist of Courses and Teachers rather than say, hard coding the array into the applet.

This is how I planned to make my constructors:

public class Teacher{
    public Teacher(String sLastName, String sFirstName, int nBlock1, int nBlock2,...int nBlock8){
    }
}

public class Course{
    public Course(int nCourseNumber, String sName, boolean bLong){
    }
}

I don't know how to do file input/output though. Everything I see on Google is for client file input, but all I want to do is import some data from the server. How do I do this?

i think you dont have to do two class,,one class is enough..

public class Schedule{
public static void main (String args[]){

}

public static String Teacher ((String sLastName, String sFirstName, int nBlock1, int nBlock2,...int nBlock8){


return;

}


public static String Course(int nCourseNumber, String sName, boolean bLong){


}

return;

}


if you do it like this,,your main method will just call those methods,,,but it is still up to you..

commented: Extremely poor advice. You have a lot to learn yet on using Java correctly. -2

That is probably the worst suggestion you could make for this. Separate classes is appropriate design for this. Just because Java will let you create a procedural program by stuffing everything into static methods and variables doesn't mean it's the correct way to use the language.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.