I recently posted a similar post to this one. The reason why I'm posting this again is because an administrator told me to put [ highlight=Java] and [/highlight] to make my post more readable I hope this is what he meant. Please help me. I'm trying to get at least a B in this course.
/** * A class to give students experience using loops. This class * creates and manipulates objects of Greg's Date class. */ public class SpeedDating { // Note: this class has no instance variables! /** * Creates an empty SpeedDating object so that you can call the methods * (a constructor that takes no parameters is known as a "default" * constructor) */ public SpeedDating() { } // Constructor has empty body /** * Prints the day of the week (e.g. "Thursday") on which Halloween will * fall for 10 consecutive years. * @param startYear the first of the 10 consecutive years */ public void printHalloweens(int startYear) { // TO DO: write body of this method here }
1.Create a SpeedDating object
2.Have the user enter a year, and call the printHalloweens method to print the day of the week on which Halloween will occur for the next 10 years, starting with the input year
3.Have the user enter another year, call the getThanksgiving method, and print the Date object returned. Print the Date in the main method, not in SpeedDating.
4.Have the user enter another year, call getThanksgiving again, and print the Date object returned again.
Right now I'm not worried about the test class. I just need some help in writing the methods. My assignment states specifically that loops must be used in order to get credit. If I can write the loops I'm pretty sure I can do the test class. Please someone help me.