Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given the following UML, create the class SnowDrift. Create your own Date and Ti

ID: 3825419 • Letter: G

Question

Given the following UML, create the class SnowDrift. Create your own Date and Time classes as well In a separate file, create a test driver that will create 5 snowdrift points as part of a SnowDrift array, with at least two points in different units. Exercise all the functions and constructors.

Be sure to include JavaDoc for each function and constructor
Include comments that are the paper-and-pencil validations for any calculations
Include a UML for your Date and Time classes
It should have generated JavaDoc files, and at least four java classes – TestSnowDrift, SnowDrift, Date, and Time.

Snow Drift date Date The date of the measurement time :Time The time of the measurement snowDepth double The snow depth units short 0 metric, 1 English Snow Drift() Use this to create a default SnowDrift with date 1/1/17, time 00:00, and snow depth of zero in metric units Snow Drift date: Date, time: Time, snowDepth: Double, units:short) getDate() Date get Time() Time t get Units short LgetsnowDrift0 ouble setTime (time: Time):void Validates time SetDate date: Date): void Validates date t IsetSnowDepth (ShowDepth:double) Validates depth setUnits (units:short):void Validates units calcSnow Rate(otherPoint: Snow Drift) Given a 2nd point, calculates the snowfall rate in double inches per hour tostring void Converts a SnowDrift to a string display Void Prints a SnowDrift point convert(units short) void If this point is of same units, do nothing. Otherwise convert to new units -remember to update both units and snowDepth

Explanation / Answer

import java.util.*;
public class Deck
{
ArrayList<Card> deck;
public Deck ()
{
deck = new ArrayList<Card>();
}
public Deck (int capacity)
{
deck = new ArrayList<Card>(capacity);
}
public int getNumCards ()
{
return deck.size();
}
public boolean isEmpty ()
{
return deck.isEmpty();
}
public void add (Card card)
{
deck.add(0,card);
}
public Card takeTop()
{
return deck.remove(0);
}
public void shuffle ()
{
Collections.shuffle(deck);
}
public void sort ()
{
Collections.sort(deck);
}
public String toString ()
{
return (deck.toString()+ " ");
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote