Please help newbie

I am writing a script for a class that is supposed to get the day, month, and year from the user and then convert it to the day of the year it is. I have to use a switch statement to do it which i have as public void findCalen(){

if (yearA % 100 == 0 || yearA % 4 == 0) {
switch (monthA)
{
and then the switch statement. im trying to call it from the application class but i can't seem to figure it out. My worker class is called calendar.java. In my application class I put
calendar cA = new calendar(0,0,0,0);
cA.calendar();
JOptionPane.showMessageDialog("It is the " + cA.getNumOfDays + "day of the year");

but its not working. I would really appreaciate the help to get this to work

Comments

  • : I am writing a script for a class that is supposed to get the day, month, and year from the user and then convert it to the day of the year it is. I have to use a switch statement to do it which i have as public void findCalen(){
    :
    : if (yearA % 100 == 0 || yearA % 4 == 0) {
    : switch (monthA)
    : {
    : and then the switch statement. im trying to call it from the application class but i can't seem to figure it out. My worker class is called calendar.java. In my application class I put
    : calendar cA = new calendar(0,0,0,0);
    : cA.calendar();
    : JOptionPane.showMessageDialog("It is the " + cA.getNumOfDays + "day of the year");
    :
    : but its not working. I would really appreaciate the help to get this to work
    :
    I think you'll get more response in the Java board. This is the java[b]SCRIPT[/b] board, which is a entirely different language with far less features and capabilities than java.
  • : : I am writing a script for a class that is supposed to get the day, month, and year from the user and then convert it to the day of the year it is. I have to use a switch statement to do it which i have as public void findCalen(){
    : :
    : : if (yearA % 100 == 0 || yearA % 4 == 0) {
    : : switch (monthA)
    : : {
    : : and then the switch statement. im trying to call it from the application class but i can't seem to figure it out. My worker class is called calendar.java. In my application class I put
    : : calendar cA = new calendar(0,0,0,0);
    : : cA.calendar();
    : : JOptionPane.showMessageDialog("It is the " + cA.getNumOfDays + "day of the year");
    : :
    : : but its not working. I would really appreaciate the help to get this to work
    : :
    : I think you'll get more response in the Java board. This is the java[b]SCRIPT[/b] board, which is a entirely different language with far less features and capabilities than java.
    :
    JavaScript is fully capible with it's objects. you could even impliment nonstandarized objects or ActiveX objects, but hacking the browsers is illegal
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories