JAVA PROGRAM NEED TO BE SUBMITTED TOMORROW   you operate 3 hot dog stands distributed throughout town. Define a class names HotDogStand that has an instance variable for the hot dos stand's ID number and an instance variable for how many hot dogs the stand has sold that day. Create a constructor that allows a user of the class to initialize both values. Also create a method named justSold that increments by one the number of hotdogs that stand has sold so that you can track the total umber of hot dogs sold by the stand. Add another method that returns the value in this variable. Write a main method to test your class with at least three ot dog stands that each sell a variety of hot dogs. defined class HotDogStand.java and will also contain :  A default constructor An overloaded constructor Getters and Setters A ‘copy’ constructor, A ‘toString’ method, An ‘equals’ method, A ‘finalize’ method,

Question

JAVA PROGRAM

NEED TO BE SUBMITTED TOMORROW

 

you operate 3 hot dog stands distributed throughout town. Define a class names HotDogStand that has an instance variable for the hot dos stand's ID number and an instance variable for how many hot dogs the stand has sold that day. Create a constructor that allows a user of the class to initialize both values.

Also create a method named justSold that increments by one the number of hotdogs that stand has sold so that you can track the total umber of hot dogs sold by the stand. Add another method that returns the value in this variable.

Write a main method to test your class with at least three ot dog stands that each sell a variety of hot dogs.

defined class HotDogStand.java and will also contain :

 A default constructor
 An overloaded constructor
 Getters and Setters
 A ‘copy’ constructor,
 A ‘toString’ method,
 An ‘equals’ method,
 A ‘finalize’ method,

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times vary by subject and question complexity. Median response time is 34 minutes and may be longer for new subjects.

Related Computer Science Q&A

Find answers to questions asked by student like you

Q: Use Java to answer the question. 5-1) (Count positive and negative numbers and compute the average o...

A: Java codeimport java.util.Scanner; public class AvgWithLoop {      public static void main(String[] ...

Q: This is for pygame Ball Class: The Ball class inherits from Drawable and it will draw a circle at it...

A: The class Ball to draw a circle at its current location:Import the Drawable class and pygame module....

Q: Construct Turing machines that will accept the following languages on {a, b}: L = L (aaba*b).

A: Turing machine: Turing machine is a model of a hypothetical computing machine which can use a predef...

Q: Task_1: Base-10 conversion of the following Base-2 values? 101101   2. 011101   3. 1001   4. 11111...

A: Conversion of Base-2 to Base-10: 1. 101101:

Q: How become a ggod programmer?

A: Good programmer:Becoming programmer is not a big thing; it is all about learning the logics of the p...

Q: Write a class, AgeMessages , which does the following:a. Ask the user to enter age using a Scannerb....

A: The given below is the code to enter the age through user and print the message according to age. To...

Q: Find context-free grammars for the following languages (with n ≥ 0, m ≥ 0)  L = {anbm : n = m − 1}.

A: Solution:A context-free grammar (CFG) is a hard and fast of recursive rewriting guidelines which is ...

Q: Create a Crow's Foot ERD to include the following business rules for the ProdCo company:a. Each sa...

A: We will draw the diagram one part by part. So first we willd ra diagram for very first two points.a)...

Q: Try giving these 2 commands $ echo cat$ cat echoExplain the differences between the output of each c...

A: echo command:echo command is used to display the line of text passed as an argument. It is a built i...