Homework Help = Arranging Strings in a 2D array

So I have this assignment, it's a bit detailed but part of the assignment requires me to make a calender that holds 8 periods for weekdays. Each period is filled with an activity, a start time and an end time.
I decided to make a 2D array for each day as I'm going to have to turn this into a .txt file later.
My goal is to have my array for one day look like this

Activity 1 - Activity 2 - Activity 3 - Activity 4
Start Time - Start Time - Start Time - Start Time
End Time - End Time - End Time - End Time - End Time.....
And so on until Activity 8.
I have no problem filling in Activity 1, Start Time 1 and End Time 1. But I'm not sure how to even access the other rows and collums of the array let alone jam a String into them.

I tried this.....

Code:

public void mondays() { monday = new String[3][8]; try { do { System.out.println("Please enter the activity, time it starts and time it ends in that order please"); input2 = br.readLine(); monday[loop][secloop] = input2; loop++; }while(loop <= 3); loop = 0; do { System.out.println("Please enter the next activity, time it starts and time it ends in that order"); input4 = br.readLine(); monday[loop][secloop] = input4; loop++; }while(loop >= 3);

In hopes that perhaps input3 would be able to enter itself as the next collumn but that was an utter failure.

public void mondays()
{
monday = new String[3][8]; try
{
do
{
System.out.println("Please enter the activity, time it starts and time it ends in that order please");
input2 = br.readLine();
monday[loop][secloop] = input2;
loop++;
}while(loop <= 3);
loop = 0;
do
{
System.out.println("Please enter the next activity, time it starts and time it ends in that order");
input4 = br.readLine();
monday[loop][secloop] = input4;
loop++;
}while(loop >= 3);

I have a 2 dimensional array that I have defined as
monday = new String[3][8]
I want to be able have a user input activities in the FIRST row.
The first row should ONLY have activities.
The SECOND and THIRD row should only have times(second row being start time and third row being end time)

In other words, the rows would be for each activity and the columns would be for the time.

My dilemma here is I have no idea how to access more then one column.
In my code I can input the information for column 1.
After that I cant input anymore as it will give me an out of bounds error as it should. The column is filled up and no more information should be put into it. I'm trying to figure out how to access the second column so that I can input information into there and so on until I have reached 8 columns with 3 rows worth of information.

A normal array would suffice

You do not actually need a 2D array for accomplishing your task. Simply declare an array of 5, in which each element in the array corresponds to a weekday of a week.

However, due to the fact that you need to hold other information such as up to 8 periods of time in a weekday along with the activities taking place at a given period, you should somehow declare your own class with properties to hold these information and the array of 5 should be declared of this class you create.

Generalising this to hold up to 8 entries of an organiser for a weekday up to one whole year, you may even use an array to hold all entries for each day, where each element in the array corresponds to the collection of entries (represented by an instance of your custom class holding an array of 8). You may declare yet another custom class to serve as an atomic unit comprising 1 activity entry within a weekday. That means, your custom class should hold the collection of 8 instances of activity-time entry.

Putting this to pseudocodes, it should sound like the following:

java Code:

/** declare a class to hold activities and time. **/publicclass Appointment{privateString description;privateDate time;// add more methods for accessing these properties.}/** declare yet another class to hold a collection of your appointments**/publicclass OrganiserEntry{private Appointment[] appointments =new Appointment[8];//I actually prefer to use ArrayList for handling arbitrary entries//declare methods to manipulate or access or search for an entry within the collection.}/** declare a custom class to hold 5 entries (1 for each weekday) for a week **/publicclass WeeklyEntry{private OrganiserEntry[] weeklyEntries=new OrganiserEntry[5];//declare convenience methods to access/search/set entries.}/** finally declare your main class holding activity entries for all weekdays **/publicclass Organiser{//assuming there are 52 weeks in a year.private WeeklyEntry[] entries =new WeeklyEntry[52];//declare methods to manipulate/search entries.}

When the programming world turns decent, the real world will turn upside down.