Develop both an uml diagram and the corresponding java class

Assignment Help JAVA Programming
Reference no: EM132109184

Programming and Logic 1: Java

NYS Win 4 Lottery Class Attributes:

name: "NYS Win 4"

gameTime: which may either Midday or Evening

wagerAmt: which may be $ .50 or $1.00

number: an integer value 0000 - 9999

For this assignment you are to develop both an uml diagram and the corresponding java class for a New York State Win 4 lottery ticket (ie. one instance of this object correlates to one NYS Win 4 Lottery ticket).

The actual ticket rules have been simplified to take some of the complexity out of it.

Your java class will have the following:

a name attribute (name of the ticket "NYS Win 4"),

a gameTime attribute which can only have one of two values "Midday" or "Evening",

a wagerAmt attribute which can only have one of two values .50 or 1.00,

a number attribute which can contain an integer value between 0000 - 9999

either a default constructor or an overloaded constructor or both

both the getter, setter methods for each of the attributes

a quickDraw method which uses the Random class to generate and assign the value for the number attribute

a toString method

Reference no: EM132109184

Questions Cloud

Design a payroll class with a string containing the employee : Write another program that demonstrates the class by creating a Payroll object , then asking the user to enter the data for an employee.
Write a void method named that accepts an integer array : Write a void method named clear that accepts an integer array , and the number of elements in the array and sets the elements of the array to 0.
Write a program to read in various types of test questions : Write a C++ program to read in various types of test questions (multiple choice and True/False) from a test bank (text file), and load the questions.
Determine if the two dimensional array is a magic square : Determine if the two dimensional array is a magic square. The main method will read the size of the array outside of the while loop
Develop both an uml diagram and the corresponding java class : Develop both an uml diagram and the corresponding java class for a New York State Win 4 lottery ticket .
Prepapre a database of books that are stored using a vector : Create a database of books that are stored using a vector. Keep track of the author, title, and publication date of each book.
What is the big deal with this as far as complex projects : what is the big deal with this as far as complex projects are concerned? Surely it is a common characteristic of project management and those whom practice
Write a function that would be used in a recursive-descent : "Given a production, write a function that would be used in a recursive-descent parser for handling that production."
Write a program that transmits a series of characters : The sequence will consist of "AlphaNumber", where Alpha is meant to be a letter, cycling from A to Z, and Number is a digit that cycles through 0 to 9.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  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.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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