answer.
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]
2 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]2 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
A network administrator is setting up a web server for a small advertising office and is concerned with data availability. The a
Aleksandr-060686 [28]

Answer:

RAID 1

Explanation:

RAID (Redundant Array of Inexpensive Disks or Drives, or Redundant Array of Independent Disks) is a data storage virtualisation technology that combines multiple physical disk drive components into one or more logical units for the purposes of data redundancy, performance improvement, or both.

RAID 1

Disk mirroring, also known as RAID 1, is the replication of data to two or more disks. Disk mirroring is a good choice for applications that require high performance and high availability, such as transnational applications, email and operating systems. Disk mirroring also works with solid state drives so “drive monitoring” may be a better term for contemporary storage systems.

8 0
2 years ago
You are an ISP. For the Address Block 195.200.0.0/16 a. If you have 320 Customers that need 128 addresses/customer - will there
12345 [234]

Answer:

a. The network will not satisfy the customers because the required addresses is 128 but what can be offered is 126.

b. 195.200.0.0/22

Explanation:

195.200.0.0/16

The number of bits to give 512 is 9

2^9=512

2^8=256 which is not up to our expected 320 customers that requires a network ip

Note we have to use a bit number that is equal or higher than our required number of networks.

The number of host per each subnet of the network (195.200.0.0/25) is (2^7)-2= 128-2=126

The network will not satisfy the customers because the required addresses is 128 but what can be offered is 126.

b. 64 customers requires  6 bits to be taken from the host bit to the network bit

i.e 2^6 = 64

195.200.0.0/22

The number of host per each subnet of the network (195.200.0.0/22) is (2^10)-2=1024 - 2 = 1022 hosts per subnet

This network meet the requirement " 64 customers want 128 addresses/customer "

5 0
2 years ago
Mitchell is assisting her teacher in a project by entering data into the spreadsheet. Which types of data can Michelle enter in
Rainbow [258]

Hello, Paper, types of data that Michelle can enter into a cell is,

• Data – values, usually numbers but can be letters or a combination of both.

• Labels – headings and descriptions to make the spreadsheet easier to understand.

• Formulas – calculations that update automatically if referenced data changes.

Hope this helped!

4 0
2 years ago
Read 2 more answers
Why computer is known as versatile and diligent device ?explain​
pashok25 [27]

They are versatile because they can be used for all sorts of tasks. They can also do many of the same tasks in different ways. They are diligent because they will do a task thoroughly until it is finished.

They work at a constant speed to do the task. Unlike a human, they will not slow down or get bored or start making mistakes that they were not doing earlier. So once they are programmed correctly to do a task, they will do it diligently.

6 0
2 years ago
What is a systems development life cycle?
gogolik [260]

Answer: D) The overall process for developing information systems from planning and analysis through implementation and maintenance.

Explanation:

System development life cycle(SDLC) is the mechanism in the cyclic form for describing about the development stages of information system.The stages involves in production of system are analysis, design, implementation, planning and maintenance. It is used for making non-technical as well as technical models of information systems.

Other options are incorrect because high stage planning, feature description or evaluation of end-users business is not done by SDLC(System development life cycle) models.

Thus, the correct option is option(D).

7 0
2 years ago
Other questions:
  • What type of hardware enables users to interact with a computer? Check all that apply. the CPU the hard disk drive the keyboard
    9·2 answers
  • Suppose you define a java class as follows: public class test { } in order to compile this program, the source code should be st
    14·1 answer
  • Juan, a network user, sends an email to you, the IT admin of the network, stating that his account is locked because he has lost
    14·1 answer
  • Server farms such as Google and Yahoo! provide enough compute capacity for the highest request rate of the day. Imagine that mos
    12·1 answer
  • Use the Manufacturing database from "Excel Databases.xls" on Blackboard. Use Excel to develop a multiple regression model to pre
    10·1 answer
  • Why is it important for element IDs to have meaningful names?
    11·1 answer
  • In this exercise you will debug the code which has been provided in the starter file. The code is intended to take two strings,
    7·1 answer
  • 2. BIOS is contained in ROM and not in RAM. Can you guess why?​
    15·1 answer
  • Directions
    6·1 answer
  • Even though Wordpress is basically free, what is the company trying to accomplish?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!