Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: How to implement GregoraianCalendar which is subclass of Calender?

  1. #1
    Junior Member
    Join Date
    Oct 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation How to implement GregoraianCalendar which is subclass of Calender?

    Ok my assignment is attached, as is the API that my teacher provided. I'm really having trouble implementing the class, if someone could get me started I'd be so appreciative!!
    GregorianDateAPIDoc.pdfcsc1350proj04f12.pdf

    Thank you!

    Meirikai
    Last edited by Deep_4; November 7th, 2012 at 11:49 AM.


  2. #2
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 139 Times in 134 Posts

    Default Re: Implementing the GregorianDate class; Help, I'm clueless!

    If you have no idea where to start, please have a look at this site here: Starting Writing a Program

    After reviewing this site and giving it a go, please feel free to come on back if you have any specific problems or questions regarding this problem or your code.

    We wish you the best of luck.

  3. #3
    Junior Member
    Join Date
    Oct 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Implementing the GregorianDate class; Help, I'm clueless!

    I've written the private ints and getters that I need, my real problem is how to do the if statements needed to make the date valid. I don't know whether those are included in the constructor GregorianDate or if they should be separate methods..?

  4. #4
    Junior Member
    Join Date
    Sep 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Your question is unclear. Please post your code.

  5. #5
    Member
    Join Date
    Dec 2009
    Location
    UK
    Posts
    58
    My Mood
    Sleepy
    Thanks
    2
    Thanked 3 Times in 2 Posts

    Default Re: Implementing the GregorianDate class; Help, I'm clueless!

    I'm not sure if this will help, and I doubt it'll be a perfect solution, but I posted some code here:

    Building your own Date class.

    I revisited this code and made it happen in PHP - okay, I know PHP is a different language, but the logic is the same and the PHP version is much cleaner I think. I'm revisiting some of my old Java code, and I think the date class could be significantly improved, however, you'll have to do it for yourself if the code is a start ;-)

    Regards,

    Shaun.

Similar Threads

  1. Why is comparison of objects of Class implementing CharSequence undefined?
    By rsameera in forum Object Oriented Programming
    Replies: 1
    Last Post: September 4th, 2011, 02:30 PM
  2. Clueless on request.getContextPath()
    By ram.java in forum What's Wrong With My Code?
    Replies: 0
    Last Post: August 29th, 2011, 12:07 PM
  3. Creating and implementing class for creating a calendar object
    By kumalh in forum Object Oriented Programming
    Replies: 3
    Last Post: July 29th, 2011, 08:40 AM
  4. [SOLVED] First assignment, clueless student, involving coordinates and distances
    By Kerrigan in forum Java Theory & Questions
    Replies: 7
    Last Post: March 10th, 2011, 03:52 PM
  5. Implementing Semaphores
    By bananasplitkids in forum Threads
    Replies: 1
    Last Post: March 27th, 2010, 04:35 AM

Tags for this Thread