So, I'm creating a class and want to make sure that I've understood everything I've been reading about OOP and constructors and all other information.
In this bit of code, when I call the class constructor, it will automatically determine the number of arguments and use the correct constructor....am I missing something or does this seem okay.....
thanks!
Leslie
I'm sure my naming conventions could use some work, but at this point using existing, and input really help me "see" what's happening!
thanks for any help.
Leslie
In an open world there's no need for windows and gates
In this bit of code, when I call the class constructor, it will automatically determine the number of arguments and use the correct constructor....am I missing something or does this seem okay.....
thanks!
Leslie
Code:
import functions.*;
import java.sql.Connection;
import java.sql.*;
//----------------------------------------------------------------------------------------
//Calculate next available TAHearing Date and Time
//Additionally cancel and reschedule an existing TAHearing
/*
* Created December 2007
* Author: Leslie Andrews
* declaration : first java program EVER!!
*/
//----------------------------------------------------------------------------------------
public class TAHearingDate {
String requestType;
String manNumber;
String issueAgency;
Date existingDateSetting;
Time existingTimeSetting;
Date newHearingDate;
Time newHearingTime;
/**
* @param args
*/
public static void main(String[] args) throws java.lang.InterruptedException
{
TAHearingDate NewRequest = new TAHearingDate(args[0], args[1], args[2], args[3], args[4]);
}
//constructor for TAHearingDate
public TAHearingDate(String inputType, String inputAgency, String inputMan){
requestType = inputType;
issueAgency = inputAgency;
manNumber = inputMan;
}
//constructor for ExistingTAHearingDate
public TAHearingDate(String inputType, String inputAgency, String inputMan, String inputExistingDate, String inputExistingTime){
requestType = inputType;
issueAgency = inputAgency;
manNumber = inputMan;
existingDateSetting = Date.valueOf(inputExistingDate);
existingTimeSetting = Time.valueOf(inputExistingTime);
}
}
I'm sure my naming conventions could use some work, but at this point using existing, and input really help me "see" what's happening!
thanks for any help.
Leslie
In an open world there's no need for windows and gates