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
Select the correct answer.
Ierofanga [76]

The program which would help Eva convert a Lisp file into machine code by interpreting only a single line of code at a time is: A.  interpreters

Interpreters can be defined as computer software programs that are designed to translate (interpret) a programming language (code) into machine code, especially by interpreting only a single line of code at a time.

Hence, an interpreter executes the instructions that are written in a programming language (code) one after the other (instruction by instruction), before it translate (interpret) the next line of code.

On the other hand, a compiler takes the entire program (code) and interprets them.

In conclusion, an interpreter can help Eva convert a Lisp file into machine code by interpreting only a single line of code at a time.

Rea d more: brainly.com/question/21130620

5 0
2 years ago
Servlet session and JSP session have differentabilities.<br>? True<br><br>? False
xxTIMURxx [149]
Your answer is true your welcome!
5 0
3 years ago
During which part of geologic time were dinosaurs most common?
ANTONII [103]
The answer is C. Jurassic.
6 0
2 years ago
Read 2 more answers
What is another name for mesolithic age
Romashka-Z-Leto [24]
In archaeology, mesolithic is culture between paleolithic and neolithic. The term "Epipaleolithic" is often used for areas outside northern Europe, but was also the preferred synonym used by French archaeologists until the 1960s.
7 0
2 years ago
Read 2 more answers
Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of z), the absolut
STALIN [3.7K]

Solution :

x = float_(input())

y = float_(input())

z = float_(input())

res1 = x**z

res2 = x**(y**z)

res3 = abs(x-y)

res4 = (x**z)**0.5

print('{:.2f} {:.2f} {:.2f} {:.2f}'.format(res1,res2,res3,res4))

Output is :

5.0

1.5

3.2

172.47 361.66 3.50 13.13

6 0
2 years ago
Other questions:
  • You've formatted the first paragraph of a document. What button can you use to apply the formatting from the first paragraph to
    9·2 answers
  • How do you tack pictures for this app
    15·1 answer
  • What does www stand for?
    10·2 answers
  • A local government uses Short Message Service (SMS) text messages to alert local residents when roads are closed. Which of the f
    13·1 answer
  • When you make taffy (a pliable candy), you must heat the candy mixture to 270 degrees Fahrenheit.
    8·1 answer
  • According to social penetration theory, the __________ dimension concerns the number of topics disclosed whereas the __________
    6·1 answer
  • How are IP addresses usually written?
    7·1 answer
  • Enter a character: * ASCII #42 Enter a character: exit Not a character
    7·1 answer
  • What is the bandwidth for asymmetric digital subscriber line<br> (ADSL)?
    10·2 answers
  • Phân tích 5 phương hướng nhiệm vụ phát triển nông -lâm -ngư nghiệp ở nước ta hiện nay
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!