-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddress.cpp
26 lines (24 loc) · 900 Bytes
/
Address.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* Address.cpp
* Implementation of the Address class.
*
* This file provides the implementation of the Address class. The class includes
* methods for setting and printing detailed address information such as street,
* city, state, and zip code. The Address class encapsulates all these properties
* and provides a cohesive way to manage and display address data.
*
* Justin Harris
* 05-30-2024
* COSC 350 - Advanced Algorthims and Data Structures
* Programming Assignment 5
* Columbia College of Missour
*/
#include "Address.h"
#include <iostream>
// Constructor definition
Address::Address(const std::string& str, const std::string& c, const std::string& st, const std::string& z)
: street(str), city(c), state(st), zip(z) {}
// Print function definition
void Address::print() const {
std::cout << street << ", " << city << ", " << state << " " << zip << std::endl;
}