Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package domain;
- public class Address {
- private String street;
- private String housnbr;
- private String postcode;
- private String city;
- private String country;
- public Address(String street, String housnbr, String postcode, String city, String country) {
- setStreet(street);
- setHousnmb(housnbr);
- setPostcode(postcode);
- setCity(city);
- setCountry(country);
- }
- public String getStreet() {
- return street;
- }
- private void setStreet(String street) {
- this.street = street;
- }
- public String getHousnmb(){
- return this.housnbr;
- }
- private void setHousnmb(String housnbr){
- this.housnbr = housnbr;
- }
- public String getPostcode() {
- return postcode;
- }
- private void setPostcode(String postcode) {
- this.postcode = postcode;
- }
- public String getCity() {
- return city;
- }
- private void setCity(String city) {
- this.city = city;
- }
- public String getCountry() {
- return country;
- }
- private void setCountry(String country) {
- this.country = country;
- }
- @Override
- public String toString(){
- return this.getStreet() + " " + this.getHousnmb() + ", " + this.getPostcode() + " " + this.getCity() + ", " + this.getCountry();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment