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
o-na [289]
3 years ago
5

/*Implement a class Address . An address has a house number, a street, an optional

Computers and Technology
1 answer:
Ludmilka [50]3 years ago
8 0

Answer:

Java.

Explanation:

public class Address {

   int houseNumber;

   String street;

   int apartmentNumber;

   String city;

   String state;

   int postalCode;

   public Address(int houseNumber, String street, String city, String state, int postalCode) {

       this.houseNumber = houseNumber;

       this.street = street;

       this.city = city;

       this.state = state;

       this.postalCode = postalCode;

   }

   public Address(int houseNumber, String street, int apartmentNumber, String city, String state, int postalCode) {

       this(houseNumber, street, city, state, postalCode);

       this.apartmentNumber = apartmentNumber;

   }

   public void printAddress() {

       System.out.printf("Street: %s%n", this.street);

       System.out.printf("City: %s, State: %s, Postal Code: %d.%n", this.city, this.state, this.postalCode);

   }

   public boolean comesBefore(Address other) {

       if (this.postalCode < other.postalCode) {

           return true;

       }

       else {

           return false;

       }    

   }

}

The few changes I made are in bold.

You might be interested in
Create a Divisible application that displays a random integer between 1 and 100 and displays appropriate messages stating whethe
mrs_skeptik [129]

Answer:

function myFunction() {

 myNumber = Math.floor(Math.random() * 100) + 1 ;

 var values = ["Number is even", "Number is odd"] ;

 var stringNum = " ";

 if (myNumber % 2 === 0){

     stringNum += values[0];

 } else {

     stringNum += values[1];

 document.getElementById("demo").innerHTML = stringNum;

}

Explanation:

The javascript source code is used by the browser to make the web application interactive, making a clickable event for the button to generate an H1 header for the web page.

The myFunction is assigned to an onclick event of a html button tag to display if a random number between 1 and 100 is even or odd.

3 0
3 years ago
Arrange the steps involved in natural language generation.
Firdavs [7]

Answer:

1. accessing content from some knowledge base.

2. picking words and connecting them to form sentences.

3. setting the tone and style of the sentence.

4. mapping the sentence plan into sentence structure.

Explanation:

Natural language generation can be defined as a part of artificial intelligence (AI) which typically involves developing responses by an AI in order to enable the computer engage in a useful conversation.

This ultimately implies that, the computer has to generate meaningful data (phrases and sentences) from the internal database.

Basically, the steps involved in natural language generation in a chronological order are listed below;

1. Text planning: accessing content from some knowledge base.

2. Picking words and connecting them to form sentences

3. Sentence planning: setting the tone and style of the sentence.

4. Text realization: mapping the sentence plan into sentence structure.

4 0
3 years ago
What is the purpose of the operating system's processor management function?
Sloan [31]
The purpose of the operating system's processor management function is that it allows you to run multiple programs on your computer simultaneously. 
5 0
3 years ago
What two different passwords can be set to lock down a computer from unauthorized access?
Shalnov [3]

The two different passwords you can use to lock down a computer from unauthorized access would be,

1. The Supervisor password

2. The User Password.

- Mabel <3

3 0
3 years ago
Specialized high-capacity second storage devices designed to meet organizational demands
zzz [600]

Answer:

CD devices

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • Why are video texts an example of multimedia? A. They use audio and visual elements together. B. They use one type of medium to
    13·2 answers
  • In internet terminology, what is the term, .com, called?
    12·2 answers
  • When performing actions between your computer and one that is infected with a virus, which of the following offers NO risk of yo
    11·2 answers
  • A program is run line by line to determine the source of a logic error. Which best describes the specific tool being used?
    11·2 answers
  • Given an initialized String variable outfile, write a statement that declares a PrintWriter reference variable named output and
    12·1 answer
  • Define Agricultural Era
    14·2 answers
  • WILL GIVE BRAINLIEST ANSWER!!!<br><br> How do you manage your screen time?
    8·2 answers
  • Web résumés allow you to include extra graphics and images that you would not include in a traditional résumé. please select the
    13·1 answer
  • 10.
    15·1 answer
  • question 2 which data link layer protocol defines the process by which lan devices interface with upper network layer protocols?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!