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

Questions Cloud

Appreciation for the value of consulting secondary resources : Objectives: Appreciation for the value of consulting secondary resources in assisting the researcher in fully understanding legal issues; in assisting the researcher in further refining legal issues; and in assisting the researcher in locating additi..
Research and writing : Research and Writing: Brief Assignment,  Review the fact pattern provided below. At this time, Mr. Kant stands convicted of either petit larceny or shoplifting, as dictated by your state statutes,
Measure the distance pa, pb, pc : Measure the distance PA, PB, PC etc. from p to various point with chain or tape and plot them to scale along the co responding rays. Join the points a, b, c, etc. to give outline of survey.
Insert uml design diagrams, use case, classes : Insert UML design diagrams here (use case, class, and sequence diagram).
Create your own date class : 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:
Write a class array that encapsulates an array : Write a class Array that encapsulates an array and provides bounds-checked access. The private instance variables should be int index and inarray[10]. The public members should be a default constructor and methods (signatures shown below) to provide ..
Uml exercise : UML Exercise: Automated Teller Machine (ATM),   1. To allow authorized card holders to make transactions,   Brief Summary of Requirements:
What is economics system : What is economics system? What are the types of economics system? Briefly explain each type of economics system by giving examples of nations that are close to each type
A sewage treatment works stw : A sewage treatment works (STW) with 4 single-stage trickling filters has become organically overloaded due to the discharge of a biodegradable industrial effluent to the STW. This is causing effluent to pond on the surface of the filters.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a driver class in java

Your project is to create a driver class that uses SuperJavaIceCreamClass.

  Print the contents of the array

Prepare a second loop that prints the contents of the array

  Java problem - g queue

A queue is an ordered collection of items in which the removal of items is restricted to the FIFO ( rst in rst out) principle.

  Simulate a simple multiuser computer system

Prepare a java program to simulate a simple multiuser computer system

  Write a java program to register students for a college

Project is for designing and developing a College Registration program. Write a Java program to register students for a college

  Socket programming in java: tcp

In this project we will develop a Web server in two steps. In the end, you will have built a multi-threaded Web server that is capable of processing multiple simultaneous service requests in parallel.

  Determine if strings are equal

Complete the recursive method match in the code below which will determine whether or not two strings match.

  File integrity checker - tripwire

Write a program that will perform some of the basic tasks accomplished by a file integrity checker such as Tripwire.

  Using a linked implementation of graph write a method

Write a method that takes two nodes as input and returns true if joining an edge between these two nodes, forms a duplicate path to one of the input nodes within the graph.

  Compute area and perimeter of a polygon

Create a project that would let a user compute area and perimeter of a polygon

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Implementation of memory management

Implementation of memory management

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