added old projects

This commit is contained in:
Austin Bennett
2026-02-03 08:18:39 -06:00
parent 43acf989bf
commit 2451448b8a
623 changed files with 28117 additions and 0 deletions
BIN
View File
Binary file not shown.
@@ -0,0 +1,298 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 55;
objects = {
/* Begin PBXBuildFile section */
D90330B5287D0FC500A796DC /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D90330B4287D0FC500A796DC /* main.cpp */; };
D90330BC287D0FF600A796DC /* laborer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D90330BB287D0FF600A796DC /* laborer.cpp */; };
D90330BF287D100800A796DC /* person.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D90330BD287D100800A796DC /* person.cpp */; };
D90330C1287D102200A796DC /* owner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D90330C0287D102200A796DC /* owner.cpp */; };
D90330C3287D102F00A796DC /* manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D90330C2287D102F00A796DC /* manager.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
D90330AF287D0FC500A796DC /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
D90330B1287D0FC500A796DC /* PeopleList */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PeopleList; sourceTree = BUILT_PRODUCTS_DIR; };
D90330B4287D0FC500A796DC /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
D90330BB287D0FF600A796DC /* laborer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = laborer.cpp; sourceTree = "<group>"; };
D90330BD287D100800A796DC /* person.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = person.cpp; sourceTree = "<group>"; };
D90330C0287D102200A796DC /* owner.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = owner.cpp; sourceTree = "<group>"; };
D90330C2287D102F00A796DC /* manager.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = manager.cpp; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D90330AE287D0FC500A796DC /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
D90330A8287D0FC400A796DC = {
isa = PBXGroup;
children = (
D90330B3287D0FC500A796DC /* PeopleList */,
D90330B2287D0FC500A796DC /* Products */,
);
sourceTree = "<group>";
};
D90330B2287D0FC500A796DC /* Products */ = {
isa = PBXGroup;
children = (
D90330B1287D0FC500A796DC /* PeopleList */,
);
name = Products;
sourceTree = "<group>";
};
D90330B3287D0FC500A796DC /* PeopleList */ = {
isa = PBXGroup;
children = (
D90330B4287D0FC500A796DC /* main.cpp */,
D90330BB287D0FF600A796DC /* laborer.cpp */,
D90330BD287D100800A796DC /* person.cpp */,
D90330C0287D102200A796DC /* owner.cpp */,
D90330C2287D102F00A796DC /* manager.cpp */,
);
path = PeopleList;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
D90330B0287D0FC500A796DC /* PeopleList */ = {
isa = PBXNativeTarget;
buildConfigurationList = D90330B8287D0FC500A796DC /* Build configuration list for PBXNativeTarget "PeopleList" */;
buildPhases = (
D90330AD287D0FC500A796DC /* Sources */,
D90330AE287D0FC500A796DC /* Frameworks */,
D90330AF287D0FC500A796DC /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = PeopleList;
productName = PeopleList;
productReference = D90330B1287D0FC500A796DC /* PeopleList */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
D90330A9287D0FC400A796DC /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastUpgradeCheck = 1340;
TargetAttributes = {
D90330B0287D0FC500A796DC = {
CreatedOnToolsVersion = 13.4.1;
};
};
};
buildConfigurationList = D90330AC287D0FC400A796DC /* Build configuration list for PBXProject "PeopleList" */;
compatibilityVersion = "Xcode 13.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = D90330A8287D0FC400A796DC;
productRefGroup = D90330B2287D0FC500A796DC /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D90330B0287D0FC500A796DC /* PeopleList */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
D90330AD287D0FC500A796DC /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D90330BF287D100800A796DC /* person.cpp in Sources */,
D90330C3287D102F00A796DC /* manager.cpp in Sources */,
D90330C1287D102200A796DC /* owner.cpp in Sources */,
D90330B5287D0FC500A796DC /* main.cpp in Sources */,
D90330BC287D0FF600A796DC /* laborer.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
D90330B6287D0FC500A796DC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.3;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
D90330B7287D0FC500A796DC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.3;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
};
name = Release;
};
D90330B9287D0FC500A796DC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = N3GD25M5J3;
ENABLE_HARDENED_RUNTIME = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
D90330BA287D0FC500A796DC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = N3GD25M5J3;
ENABLE_HARDENED_RUNTIME = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
D90330AC287D0FC400A796DC /* Build configuration list for PBXProject "PeopleList" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D90330B6287D0FC500A796DC /* Debug */,
D90330B7287D0FC500A796DC /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D90330B8287D0FC500A796DC /* Build configuration list for PBXNativeTarget "PeopleList" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D90330B9287D0FC500A796DC /* Debug */,
D90330BA287D0FC500A796DC /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = D90330A9287D0FC400A796DC /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>PeopleList.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

+42
View File
@@ -0,0 +1,42 @@
#include "person.cpp"
using namespace std;
class Laborer : public Person
{
protected:
string _job;
string _laborerEmployeeID;
string _hourlySalary;
string _hoursWorked;
public:
Laborer(string laborerName, string laborerBirthday, string laborerSSN, string job, string employeeID, string hourlySalary, string hoursWorked) : Person(laborerName, laborerBirthday, laborerSSN)
{
_job = job;
_laborerEmployeeID = employeeID;
_hourlySalary = hourlySalary;
_hoursWorked = hoursWorked;
}
// Accessors
string getJob() { return _job; };
string getEmployeeID() { return _laborerEmployeeID; };
string getHourlySalary() { return _hourlySalary; };
string getHoursWorked() { return _hoursWorked; };
string getType() { return "Laborer"; }
virtual string getName() { return _name; };
// Mutators
void setJob(string job) { _job = job; };
void setEmployeeID(string employeeID) { _laborerEmployeeID = employeeID; };
void setHourlySalary(string hourlySalary) { _hourlySalary = hourlySalary; };
void setHoursWorked(string hoursWorked) { _hoursWorked = hoursWorked; };
void Display()
{
cout << endl;
cout << getType() << ":" << endl;
cout << " " << getName() << " " << getBirthday() << " " << getSSN() << " " << getJob() << " " << getEmployeeID() << " " << getHourlySalary() << " " << getHoursWorked() << endl;
}
};
+253
View File
@@ -0,0 +1,253 @@
//
// main.cpp
// Business
//
// Created by Austin Bennett on 7/7/22.
//
#include <iostream>
#include <vector>
#include "person.cpp"
#include "laborer.cpp"
#include "manager.cpp"
#include "owner.cpp"
using namespace std;
vector<Person *> list;
void DisplayAddMenu()
{
int choice;
do
{
cout << endl
<< " 1 - Add Laborer\n"
<< " 2 - Add Manager\n"
<< " 3 - Add Owner\n"
<< " 4 - Return to Main Menu\n"
<< " Enter your choice and press return: ";
cin >> choice;
cout << endl;
if (choice == 1)
{
cout << "Name: ";
string name;
cin.ignore();
getline(cin, name);
cout << "Birthday: ";
string birthday;
getline(cin, birthday);
cout << "SSN: ";
string ssn;
getline(cin, ssn);
cout << "Job: ";
string job;
getline(cin, job);
cout << "Employee ID: ";
string laborerEmployeeID;
getline(cin, laborerEmployeeID);
cout << "Hourly Salary: ";
string hourlySalary;
getline(cin, hourlySalary);
cout << "Hours Worked: ";
string hoursWorked;
getline(cin, hoursWorked);
list.push_back(new Laborer(name, birthday, ssn, job, laborerEmployeeID, hourlySalary, hoursWorked));
}
else if (choice == 2)
{
cout << "Name: ";
string name;
cin.ignore();
getline(cin, name);
cout << "Birthday: ";
string birthday;
getline(cin, birthday);
cout << "SSN: ";
string ssn;
getline(cin, ssn);
cout << "Department: ";
string department;
getline(cin, department);
cout << "Employee ID: ";
string managerEmployeeID;
getline(cin, managerEmployeeID);
cout << "Salary: ";
string salary;
getline(cin, salary);
list.push_back(new Manager(name, birthday, ssn, department, managerEmployeeID, salary));
}
else if (choice == 3)
{
cout << "Name: ";
string name;
cin.ignore();
getline(cin, name);
cout << "Birthday: ";
string birthday;
getline(cin, birthday);
cout << "SSN: ";
string ssn;
getline(cin, ssn);
cout << "Percent Owned: ";
string percentOwned;
getline(cin, percentOwned);
cout << "Owner Since: ";
string ownerSince;
getline(cin, ownerSince);
list.push_back(new Owner(name, birthday, ssn, percentOwned, ownerSince));
}
else if (choice == 4)
{
break;
}
else
{
cout << "Invalid Input\n";
cin.clear();
cin.ignore(10000, '\n');
}
} while (choice != 4);
}
void DisplayListMenu()
{
int choice;
do
{
cout << endl
<< " 1 - View Laborers\n"
<< " 2 - View Managers\n"
<< " 3 - View Owners\n"
<< " 4 - Return to Main Menu\n"
<< " Enter your choice and press return: ";
cin >> choice;
cout << endl;
if (choice == 1)
{
for (int i = 0; i < list.size(); i++)
{
string type = list[i]->getType();
if (type == "Laborer")
{
list[i]->Display();
}
}
}
else if (choice == 2)
{
for (int i = 0; i < list.size(); i++)
{
string type = list[i]->getType();
if (type == "Manager")
{
list[i]->Display();
}
}
}
if (choice == 3)
{
for (int i = 0; i < list.size(); i++)
{
string type = list[i]->getType();
if (type == "Owner")
{
list[i]->Display();
}
}
}
else if (choice == 4)
{
break;
}
else
{
cin.clear();
cin.ignore(10000, '\n');
}
} while (choice != 4);
}
int main()
{
int choice;
do
{
cout << endl
<< " 1 - Add Person\n"
<< " 2 - Display List\n"
<< " 3 - Sort List\n"
<< " 4 - Exit.\n"
<< " Enter your choice and press return: ";
cin >> choice;
cout << endl;
if (choice == 1)
{
DisplayAddMenu();
}
else if (choice == 2)
{
DisplayListMenu();
}
else if (choice == 3)
{
int i, j, n;
n = list.size();
for (i = 0; i < n - 1; i++)
{
for (j = 0; j < n - i - 1; j++)
{
if (list[j] -> getName() > list[j + 1] -> getName())
{
swap(list[j], list[j + 1]);
}
}
}
for (int i = 0; i < n; i++)
{
list[i] -> Display();
}
}
else if (choice == 4)
{
cout << "End of Program.\n";
cin.clear();
cin.ignore(10000, '\n');
}
else
{
cout << "Not a Valid Choice. \nChoose again.\n";
}
} while (choice != 4);
return 0;
}
+38
View File
@@ -0,0 +1,38 @@
#include "person.cpp"
using namespace std;
class Manager : public Person
{
protected:
string _department;
string _managerEmployeeID;
string _salary;
public:
Manager(string managerName, string managerBirthday, string managerSSN, string department, string employeeID, string salary) : Person(managerName, managerBirthday, managerSSN)
{
_department = department;
_managerEmployeeID = employeeID;
_salary = salary;
}
// Accessors
string getDepartment() { return _department; };
string getEmployeeID() { return _managerEmployeeID; };
string getSalary() { return _salary; };
string getType() { return "Manager"; };
virtual string getName() { return _name; };
// Mutators
void setDepartment(string department) { _department = department; };
void setEmployeeID(string employeeID) { _managerEmployeeID = employeeID; };
void setSalary(string salary) { _salary = salary; };
void Display()
{
cout << endl;
cout << getType() << ":" << endl;
cout << " " << getName() << " " << getBirthday() << " " << getSSN() << " " << getDepartment() << " " << getEmployeeID() << " " << getSalary() << endl;
}
};
+34
View File
@@ -0,0 +1,34 @@
#include "person.cpp"
using namespace std;
class Owner : public Person
{
protected:
string _percentOwned;
string _ownerSince;
public:
Owner(string ownerName, string ownerBirthday, string ownerSSN, string percentOwned, string ownerSince) : Person(ownerName, ownerBirthday, ownerSSN)
{
_percentOwned = percentOwned;
_ownerSince = ownerSince;
}
// Accessors
string getPercentOwned() { return _percentOwned; };
string getOwnerSince() { return _ownerSince; };
string getType() { return "Owner"; };
virtual string getName() { return _name; };
// Mutators
void setPercentOwned(string percentOwned) { _percentOwned = percentOwned; };
void setOwnerSince(string ownerSince) { _ownerSince = ownerSince; };
void Display()
{
cout << endl;
cout << getType() << ":" << endl;
cout << " " << getName() << " " << getBirthday() << " " << getSSN() << " " << getPercentOwned() << " " << getOwnerSince() << endl;
}
};
+36
View File
@@ -0,0 +1,36 @@
#include <string>
#include <iostream>
#pragma once
using namespace std;
class Person
{
protected:
string _name;
string _birthday;
string _ssn;
public:
Person(string name, string birthday, string ssn)
{
_name = name;
_birthday = birthday;
_ssn = ssn;
}
// Accessors
string getBirthday() { return _birthday; };
string getSSN() { return _ssn; };
// Mutators
void setName(string name) { _name = name; }
void setBirthday(string birthday) { _birthday = birthday; };
void setSSN(string ssn) { _ssn = ssn; };
virtual void Display() = 0;
virtual string getType() = 0;
virtual string getName() = 0;
};