1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
gladu [14]
3 years ago
11

Create a class called Date that includes three pieces of information as instance variables—a month (type int), a day (type int),

and a year (type int). Your class should have a constructor that initializes the three instance variables and assumes that the values provided are correct. Provide a set and a get method for each instance variable. Provide a method displayDate that displays the month, day, and year separated by forward slashes (/). Write a test application named DateTest that demonstrates class Date’s capabilities
Computers and Technology
1 answer:
Strike441 [17]3 years ago
3 0

Answer:

public class Date {

   private int month;

   private int day;

   private int year;

   // Constructor

   public Date(int month, int day, int year) {

       this.month = month;

       this.day = day;

       this.year = year;

   }

   //Getters and setter

   public int getMonth() {

       return month;

   }

   public void setMonth(int month) {

       this.month = month;

   }

   public int getDay() {

       return day;

   }

   public void setDay(int day) {

       this.day = day;

   }

   public int getYear() {

       return year;

   }

   public void setYear(int year) {

       this.year = year;

   }

   void displayDate(){

       System.out.println(getMonth()+"/"+getDay()+"/"+getYear());

   }

}

//Test Class

class DateTest {

   public static void main(String[] args) {

       Date dateOne = new Date(12, 25, 2019);

       dateOne.displayDate();

   }

}

Explanation:

  • Using Java programming Language
  • Create the Date class with the instance variables (Month, day and year) all of type int
  • Create the the constructor to initialize all the instance variables
  • Create getters and setters for all the instance variables
  • Create the displayDate() method which uses string concatenation along with the get() method of all the instance variables
  • Create a test class that initializes an instance of the of the Date class
  • Call the method displayDate on the instance of the class created

You might be interested in
Which asynchronous electronic community is also known as a forum?
Semmy [17]
What are the choices?
Message Boarding is the asynchronous electronic that is know as a forum.
3 0
4 years ago
Read 2 more answers
rapid prototyping could be an advantageous methodology for developing innovative computer-based instruction. Software engineers
frosja888 [35]

The option that is true for the Student Version above is option d:  This is not plagiarism.

<h3>What is plagiarism?</h3>

This is known to be the act of copying other people's work and then taking it as your own.

When you look at the student work, you will see some measures od differences. Hence, The option that is true for the Student Version above is option d:  This is not plagiarism.

Learn more about prototyping  from

brainly.com/question/14743515
#SPJ1

See  full question below

Original Source Material

There is a design methodology called rapid prototyping, which has been used successfully in software engineering. Given similarities between software design and instructional design, we argue that rapid prototyping is a viable method for instructional design, especially for computer-based instruction.

Student Version

Rapid prototyping could be an advantageous methodology for developing innovative computer-based instruction. Software engineers have been successful in designing applications by using rapid prototyping. So it also could be an efficient way to do instructional design.

Which of the following is true for the Student Version above?

a. Word-for-Word plagiarism

b. Paraphrasing plagiarism

c. This is not plagiarism

8 0
2 years ago
An entity can be said to have __ when it can be wronged or has feelings of some sort
liberstina [14]
Moral status because moral status is your feelings
5 0
3 years ago
Why team goals should be broken into shon-term, medium-term, and long-term goals
lora16 [44]

Answer:

Explanation: Goals should be broken down according to time because it allows the team to decide what their overall purpose is, and to define the actions that will allow them to achieve their overall purpose.

7 0
3 years ago
Read 2 more answers
In 3–5 sentences, describe how technology helps business professionals to be more efficient.
quester [9]

Answer:

Technology helps business professionals, keep more organized, communicate better, and effectively keeps businesses secure. Technology helps keep employee information and business paper work more organized using computers and software; while making it easier to communicate with employee's using e-mail and memo's.

Explanation:

8 0
4 years ago
Read 2 more answers
Other questions:
  • While designing web pages for mobiles, the page content should be extensive such that the readers get the opportunity to explore
    5·2 answers
  • Software that interprets commands from the keyboard and mouse is also known as the
    8·1 answer
  • . Reorder the following efficiencies from smallest to largest:
    9·1 answer
  • You should use html elements instead of server controls when
    11·1 answer
  • Please help me answer this question
    14·1 answer
  • Provide examples of the cost of quality based on your own experiences
    14·1 answer
  • .true or false? one disadvantage of cloudware is that it is never free<br> A. true<br> B. false
    12·1 answer
  • Como se diseña y produce un material audiovisual
    5·1 answer
  • Question: 11
    10·1 answer
  • Add comma(s) where needed, if needed.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!