Create your own date class

Assignment Help JAVA Programming
Reference no: EM1317341

Description

You are to write a program that determines the day of the week for New Year's Day in the year 3000. To do this, you must create your own date class (MyDate) and use the following interface and main program:

See attachment:- Assignment The Dating Game.docx

When the program is compiled and run, it should use your MyDate class to correctly predict the day of the week for January 1st, 3000. Note that we are using the integers 0-6 for the days of the week, with 0 representing Sunday, 1 for Monday, etc.

Additional Requirements

? Implement a yesterday() function which moves the date one day backwards. Modify your main program to print the date, including the day of the week, for January 1st, 1800. (Hint: back up to December 31st, 1799, and then call tomorrow() once.)

? Using the built-in Date class from Java, have your constructor automatically initialize the date to today. Also, add a today() function to your class to set the date to today. Modify the main program to print today's date using your class.

? Using UML, create a high level design (a.k.a. architecture) of your program before implementation. Include your design (architecture) as an appendix to your Word document submission. You are required to include a simple use case diagram, class diagram and sequence diagram for at least one method.

Notes

? Don't forget to include comments (javadoc compatible), and remember to indent properly.

? Include pre- and post-conditions for your functions/methods. (That is, the comments should state what the function does, and what it needs to do it.)

? For simplicity, you can pretend all months have 30 days and that there are no leap years for early versions of your program. Add the actual month lengths and leap year information later.

? Aleap year is a year when February has 29 days. A year is a leap year if the year is divisible by 4, but not by 100, or if it is divisible by 100, it must also be divisible by 400. So 1900 was not a leap year, but 2000 was.

? Your tomorrow() and yesterday() functions should fit on one page or less. If they are bigger than that, use some helper functions to break them down.

? Be sure to incorporate proper exception handling for invalid input data.

? Utilize the submission template provided in the course module.

Reference no: EM1317341

Create a class named blooddata that includes fields

Create a class named BloodData that includes fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh factor (the factors are + and -). Create a de

Program will read parameters plaintext and ciphertextfrom

Specifically, your program will read parameters, plaintext and ciphertextfrom a file named "input.txt" (under the same directory).Then your program needs tocreate a file named

Statements to print a label

Add the statements to print a label in the following format (the numbers in the example output are correct for input of $4.25 per pound and 41 ounces). Use the formatting obje

Write a program called render.java

Optionally you may wish to add texture mapping to make your models look more realistic, and you may want to supply the user some controls that affect the colours and lightin

Write java program which will permit user to input data

Write the Java Program which will permit the user to input data. The data will be validated using a loop that requires the user to input the data until it is correct or in t

Generate and display the polynomial

Design and write the methods calculate Brute Force and calculate Horner for calculating the polynomial value for an integer value of x by using the brute force approach and

Prompts the user for three first names

Write an application that prompts the user for three first names and concatenates them in every possible two-name combination so that new parents can easily compare them to fi

Wa program that takes 10 values represent

Using a loop, write a program that takes 10 values represent in exam grades (between 0 and 100) from the keyboard and outputs the minimum value, maximum value, and average v

Reviews

Write a Review

 
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd