From de27802645f5af2e32c3080e79e2e52365f657f4 Mon Sep 17 00:00:00 2001 From: Yana Blashchishina Date: Mon, 26 Feb 2024 15:51:49 -0800 Subject: init --- .gitignore | 398 ++++++++++++++++++++++++++ Homework7/Homework7.sln | 31 ++ Homework7/Homework7/ContactList.cpp | 7 + Homework7/Homework7/ContactList.h | 34 +++ Homework7/Homework7/Homework7.vcxproj | 141 +++++++++ Homework7/Homework7/Homework7.vcxproj.filters | 36 +++ Homework7/Homework7/contact.h | 57 ++++ Homework7/Homework7/contacts.cpp | 89 ++++++ Homework7/Homework7/main.cpp | 47 +++ 9 files changed, 840 insertions(+) create mode 100644 .gitignore create mode 100644 Homework7/Homework7.sln create mode 100644 Homework7/Homework7/ContactList.cpp create mode 100644 Homework7/Homework7/ContactList.h create mode 100644 Homework7/Homework7/Homework7.vcxproj create mode 100644 Homework7/Homework7/Homework7.vcxproj.filters create mode 100644 Homework7/Homework7/contact.h create mode 100644 Homework7/Homework7/contacts.cpp create mode 100644 Homework7/Homework7/main.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8a30d25 --- /dev/null +++ b/.gitignore @@ -0,0 +1,398 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/Homework7/Homework7.sln b/Homework7/Homework7.sln new file mode 100644 index 0000000..46b1321 --- /dev/null +++ b/Homework7/Homework7.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34330.188 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Homework7", "Homework7\Homework7.vcxproj", "{7385B9B4-FCA5-48CA-9778-4F2F196936ED}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7385B9B4-FCA5-48CA-9778-4F2F196936ED}.Debug|x64.ActiveCfg = Debug|x64 + {7385B9B4-FCA5-48CA-9778-4F2F196936ED}.Debug|x64.Build.0 = Debug|x64 + {7385B9B4-FCA5-48CA-9778-4F2F196936ED}.Debug|x86.ActiveCfg = Debug|Win32 + {7385B9B4-FCA5-48CA-9778-4F2F196936ED}.Debug|x86.Build.0 = Debug|Win32 + {7385B9B4-FCA5-48CA-9778-4F2F196936ED}.Release|x64.ActiveCfg = Release|x64 + {7385B9B4-FCA5-48CA-9778-4F2F196936ED}.Release|x64.Build.0 = Release|x64 + {7385B9B4-FCA5-48CA-9778-4F2F196936ED}.Release|x86.ActiveCfg = Release|Win32 + {7385B9B4-FCA5-48CA-9778-4F2F196936ED}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {33B4C770-05AB-4940-94EA-569EFAED3406} + EndGlobalSection +EndGlobal diff --git a/Homework7/Homework7/ContactList.cpp b/Homework7/Homework7/ContactList.cpp new file mode 100644 index 0000000..69691b3 --- /dev/null +++ b/Homework7/Homework7/ContactList.cpp @@ -0,0 +1,7 @@ +#include "ContactList.h" + +Contact::ContactList() +{ + + +} \ No newline at end of file diff --git a/Homework7/Homework7/ContactList.h b/Homework7/Homework7/ContactList.h new file mode 100644 index 0000000..afbdbe3 --- /dev/null +++ b/Homework7/Homework7/ContactList.h @@ -0,0 +1,34 @@ +#ifndef CONTACT_LIST_H +#define CONTACT_LIST_H + +#include "contact.h" + +class Contact { +public: + ContactList() = default; + ~ContactList(); + + void DeleteContact(Contact& contact); + + void CopyList(const Contact* contacts, const size_t& size); + + void AddContact(const Contact& contact); + + void Print() const; + + size_t Size() const; + +private: + + Contact* contacts_{ nullptr }; + + size_t length_{ 0 }; + + size_t size_{ 0 }; + + + +}; + + +#endif diff --git a/Homework7/Homework7/Homework7.vcxproj b/Homework7/Homework7/Homework7.vcxproj new file mode 100644 index 0000000..8f30d74 --- /dev/null +++ b/Homework7/Homework7/Homework7.vcxproj @@ -0,0 +1,141 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {7385b9b4-fca5-48ca-9778-4f2f196936ed} + Homework7 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Homework7/Homework7/Homework7.vcxproj.filters b/Homework7/Homework7/Homework7.vcxproj.filters new file mode 100644 index 0000000..641401c --- /dev/null +++ b/Homework7/Homework7/Homework7.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/Homework7/Homework7/contact.h b/Homework7/Homework7/contact.h new file mode 100644 index 0000000..1515461 --- /dev/null +++ b/Homework7/Homework7/contact.h @@ -0,0 +1,57 @@ +#ifndef CONTACT_H +#define CONTACT_H + + +class Contact { +public: + Contact(); + Contact(const char* firstName, const char* lastName, const char* streetAddress, const char* city, const char* state, int zip, const char* email); + + ~Contact(); + + + void Print(); + + + + const char* GetFirstName(); + void SetFirstName(const char* firstName); + + const char* GetLastName(); + void SetLastName(const char* lastName); + + const char* GetStreetAddress(); + void SetStreetAddress(const char* streetAddress); + + const char* GetCity(); + void SetCity(const char* city); + + const char* GetState(); + void SetState(const char* state); + + int GetZip(); + void SetZip(int zip); + + + + const char* GetEmail(); + void SetEmail(const char* email); + + + +private: + + + const char* _firstName{ }; + const char* _lastName{ }; + const char* _streetAddress{ }; + const char* _city{ }; + const char* _state{ }; + int _zip{ 0 }; + const char* _email{ }; + + + + +}; +#endif diff --git a/Homework7/Homework7/contacts.cpp b/Homework7/Homework7/contacts.cpp new file mode 100644 index 0000000..54a9de6 --- /dev/null +++ b/Homework7/Homework7/contacts.cpp @@ -0,0 +1,89 @@ +#include "contactList.h" +#include + + +Contact::Contact() { } + +Contact::Contact(const char* firstName, const char* lastName, const char* streetAddress, const char* city, const char* state, int zip, const char* email) { + _firstName = firstName; + _lastName = lastName; + _streetAddress = streetAddress; + _city = city; + _state = state; + _zip = zip; + _email = email; +} + +Contact::~Contact() { } + + + +void Contact::Print() { + std::cout << "First Name: " << _firstName << std::endl; + std::cout << "Last Name: " << _lastName << std::endl; + std::cout << "Street Address: " << _streetAddress << std::endl; + std::cout << "City: " << _city << std::endl; + std::cout << "State: " << _state << std::endl; + std::cout << "Zip: " << _zip << std::endl; + std::cout << "Email: " << _email << std::endl; +} + + + + + +void Contact::SetFirstName(const char* firstName) { + _firstName = firstName; +} + +const char* Contact::GetFirstName() { + return _firstName; +} + +void Contact::SetLastName(const char* lastName) { + _lastName = lastName; +} + +const char* Contact::GetLastName() { + return _lastName; +} + + + +const char* Contact::GetStreetAddress() { + return _streetAddress; +} + +void Contact::SetStreetAddress(const char* streetAddress) { + _streetAddress = streetAddress; +} + +const char* Contact::GetCity() { + return _city; +} +void Contact::SetCity(const char* city) { + _city = city; +} + +const char* Contact::GetState() { + return _state; +} +void Contact::SetState(const char* state) { + _state = state; +} + +int Contact::GetZip() { + return _zip; +} + +void Contact::SetZip(int zip) { + _zip = zip; +} + +const char* Contact::GetEmail() { + return _email; +} + +void Contact::SetEmail(const char* email) { + _email = email; +} diff --git a/Homework7/Homework7/main.cpp b/Homework7/Homework7/main.cpp new file mode 100644 index 0000000..34127e7 --- /dev/null +++ b/Homework7/Homework7/main.cpp @@ -0,0 +1,47 @@ +// Name: Yana Blashchishina +// Date: 2/26/2024 +// Class: CST116 +// Assignment: Homework 7 + +#include "contactList.h" +#include + +int main() { + + Contact newContact; + + std::cout << newContact.GetFirstName(); + + + + newContact.GetFirstName(); + newContact.SetFirstName("Yana"); + + newContact.GetLastName(); + newContact.SetLastName("Blashchishina"); + + newContact.GetStreetAddress(); + newContact.SetStreetAddress("123 Sesame Street"); + + newContact.GetCity(); + newContact.SetCity("Not Portland"); + + newContact.GetState(); + newContact.SetState("Not California"); + + newContact.GetZip(); + newContact.SetZip(97089); + + + newContact.GetEmail(); + newContact.SetEmail("meow.gmail.com"); + + newContact.Print(); + + return 0; + + + + + return 0; +} \ No newline at end of file -- cgit v1.2.3