Question 21 (4 points) In Java, implement a class Address. An address has a house number, a street, an optional apartmen

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Question 21 (4 points) In Java, implement a class Address. An address has a house number, a street, an optional apartmen

Post by answerhappygod »

Question 21 4 Points In Java Implement A Class Address An Address Has A House Number A Street An Optional Apartmen 1
Question 21 4 Points In Java Implement A Class Address An Address Has A House Number A Street An Optional Apartmen 1 (56.5 KiB) Viewed 27 times
Question 21 (4 points) In Java, implement a class Address. An address has a house number, a street, an optional apartment number, a city, a state, and a postal code. Supply two constructors: one with an apartment number and one without. Supply a print method that prints the address with the street on one line and the city, state, and zip code on the next line. boolean Supply a method public comesBefore(Address other) that tests whether this address comes before another when the addresses are compared by postal code. Then, add code that runs your implementation to show that it works. (HINT: Test this "live", including the testing, before uploading your answer here!)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply