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
Binary file not shown.
@@ -0,0 +1,296 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objects = {
/* Begin PBXBuildFile section */
D94DBF2B2885BA67008CA966 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D94DBF2A2885BA67008CA966 /* main.cpp */; };
D9600E3A28863970002D0806 /* node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9600E3828863970002D0806 /* node.cpp */; };
D9600E3D288639ED002D0806 /* doublylinkedlist.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D9600E3B288639ED002D0806 /* doublylinkedlist.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
D94DBF252885BA67008CA966 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
D94DBF272885BA67008CA966 /* DoublyLinkedList */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = DoublyLinkedList; sourceTree = BUILT_PRODUCTS_DIR; };
D94DBF2A2885BA67008CA966 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
D9600E3828863970002D0806 /* node.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = node.cpp; sourceTree = "<group>"; };
D9600E3928863970002D0806 /* node.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = node.hpp; sourceTree = "<group>"; };
D9600E3B288639ED002D0806 /* doublylinkedlist.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = doublylinkedlist.cpp; sourceTree = "<group>"; };
D9600E3C288639ED002D0806 /* doublylinkedlist.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = doublylinkedlist.hpp; sourceTree = "<group>"; };
D9600E3E28864BBD002D0806 /* input.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = input.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D94DBF242885BA67008CA966 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
D94DBF1E2885BA67008CA966 = {
isa = PBXGroup;
children = (
D94DBF292885BA67008CA966 /* DoublyLinkedList */,
D94DBF282885BA67008CA966 /* Products */,
);
sourceTree = "<group>";
};
D94DBF282885BA67008CA966 /* Products */ = {
isa = PBXGroup;
children = (
D94DBF272885BA67008CA966 /* DoublyLinkedList */,
);
name = Products;
sourceTree = "<group>";
};
D94DBF292885BA67008CA966 /* DoublyLinkedList */ = {
isa = PBXGroup;
children = (
D9600E3E28864BBD002D0806 /* input.h */,
D94DBF2A2885BA67008CA966 /* main.cpp */,
D9600E3828863970002D0806 /* node.cpp */,
D9600E3928863970002D0806 /* node.hpp */,
D9600E3B288639ED002D0806 /* doublylinkedlist.cpp */,
D9600E3C288639ED002D0806 /* doublylinkedlist.hpp */,
);
path = DoublyLinkedList;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
D94DBF262885BA67008CA966 /* DoublyLinkedList */ = {
isa = PBXNativeTarget;
buildConfigurationList = D94DBF2E2885BA67008CA966 /* Build configuration list for PBXNativeTarget "DoublyLinkedList" */;
buildPhases = (
D94DBF232885BA67008CA966 /* Sources */,
D94DBF242885BA67008CA966 /* Frameworks */,
D94DBF252885BA67008CA966 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = DoublyLinkedList;
productName = DoublyLinkedList;
productReference = D94DBF272885BA67008CA966 /* DoublyLinkedList */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
D94DBF1F2885BA67008CA966 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastUpgradeCheck = 1400;
TargetAttributes = {
D94DBF262885BA67008CA966 = {
CreatedOnToolsVersion = 14.0;
};
};
};
buildConfigurationList = D94DBF222885BA67008CA966 /* Build configuration list for PBXProject "DoublyLinkedList" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = D94DBF1E2885BA67008CA966;
productRefGroup = D94DBF282885BA67008CA966 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D94DBF262885BA67008CA966 /* DoublyLinkedList */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
D94DBF232885BA67008CA966 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D94DBF2B2885BA67008CA966 /* main.cpp in Sources */,
D9600E3A28863970002D0806 /* node.cpp in Sources */,
D9600E3D288639ED002D0806 /* doublylinkedlist.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
D94DBF2C2885BA67008CA966 /* 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++20";
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 = 13.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
D94DBF2D2885BA67008CA966 /* 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++20";
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 = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
};
name = Release;
};
D94DBF2F2885BA67008CA966 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = N3GD25M5J3;
ENABLE_HARDENED_RUNTIME = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
D94DBF302885BA67008CA966 /* 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 */
D94DBF222885BA67008CA966 /* Build configuration list for PBXProject "DoublyLinkedList" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D94DBF2C2885BA67008CA966 /* Debug */,
D94DBF2D2885BA67008CA966 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D94DBF2E2885BA67008CA966 /* Build configuration list for PBXNativeTarget "DoublyLinkedList" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D94DBF2F2885BA67008CA966 /* Debug */,
D94DBF302885BA67008CA966 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = D94DBF1F2885BA67008CA966 /* 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,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "BE8CEB0C-9E10-40CF-99EA-D35BAD672829"
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "FDA67FEE-0973-43F2-97CC-329B476FDABB"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DoublyLinkedList/doublylinkedlist.cpp"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "53"
endingLineNumber = "53"
landmarkName = "DoublyLinkedList::Remove(index)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "EC240E5E-A1E1-489F-8226-2E8EC813A75B"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DoublyLinkedList/doublylinkedlist.cpp"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "56"
endingLineNumber = "56"
landmarkName = "DoublyLinkedList::Remove(index)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "C2F43595-2D23-4C6B-89BA-AA9518B7082B"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "DoublyLinkedList/doublylinkedlist.cpp"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "54"
endingLineNumber = "54"
landmarkName = "DoublyLinkedList::Remove(index)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
@@ -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>DoublyLinkedList.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 507 KiB

@@ -0,0 +1,98 @@
//
// doublylinkedlist.cpp
// DoublyLinkedList
//
// Created by Austin Bennett on 7/18/22.
//
/*
Constructor
Destructor
Insert function
Remove function
Accessor function
Mutator function
*/
#include <iostream>
#include "doublylinkedlist.hpp"
using namespace::std;
DoublyLinkedList::DoublyLinkedList() {
front = NULL;
back = NULL;
}
void DoublyLinkedList::Insert(double data) {
Node* newNode = new Node(data);
bool isEmpty = (front == NULL);
if (isEmpty) {
front = newNode;
back = newNode;
newNode -> prev = NULL;
newNode -> next = NULL;
} else {
back -> next = newNode;
newNode -> prev = back;
newNode -> next = NULL;
back = newNode;
}
}
void DoublyLinkedList::Remove(int index) {
Node* temp = front;
int count = 0;
for (int i = 0; temp != NULL && i < index; i++) {
temp = temp -> next;
}
if (temp == front) {
temp -> next = front;
front -> prev = NULL;
} else if (temp == back) {
temp -> prev = back;
back -> next = NULL;
} else {
Node* a = temp -> prev;
Node* b = temp -> next;
b -> prev = a;
a -> next = b;
}
free(temp);
return;
}
void DoublyLinkedList::DisplayFB() {
Node* temp = front;
while (temp != NULL) {
cout << temp -> data << " -> ";
temp = temp -> next;
}
cout << "NULL" << endl;
}
void DoublyLinkedList::DisplayBF() {
Node* temp = back;
while (temp != NULL) {
cout << temp -> data << " -> ";
temp = temp -> prev;
}
cout << "NULL" << endl;
}
void DoublyLinkedList::Mutate(int index, double value) {
Node* temp = front;
for (int i = 0; temp != NULL && i < index; i++) {
temp = temp->next;
}
temp -> data = value;
}
@@ -0,0 +1,37 @@
//
// doublylinkedlist.hpp
// DoublyLinkedList
//
// Created by Austin Bennett on 7/18/22.
//
/*
Constructor
Destructor
Insert function
Remove function
Accessor function
Mutator function
*/
#ifndef doublylinkedlist_hpp
#define doublylinkedlist_hpp
#include <stdio.h>
#include "node.hpp"
class DoublyLinkedList {
private:
Node* front;
Node* back;
public:
DoublyLinkedList();
//~DoublyLinkedList();
void Insert(double data);
void Remove(int index);
void DisplayFB();
void DisplayBF();
void Mutate(int index, double value);
};
#endif /* doublylinkedlist_hpp */
@@ -0,0 +1,49 @@
/*
* Header file for ReadValue
*/
#include <iostream>
#include <climits>
#include <string>
template<typename inputType>
inputType ReadValue(std::string prompt)
{
inputType returnValue=0;
std::cout << prompt;
std::cin >> returnValue;
while (std::cin.fail()) {
std::cout << "Error! Cannot read input.\n";
std::cin.clear();
std::cin.ignore(INT_MAX,'\n');
std::cout << prompt;
std::cin >> returnValue;
}
return returnValue;
}
template<typename inputType>
inputType ReadValue(std::string prompt, inputType minValue)
{
inputType returnValue=0;
returnValue=ReadValue<inputType>(prompt);
while (returnValue < minValue) {
std::cout << "Error! Value must be >= " << minValue << std::endl;
returnValue=ReadValue<inputType>(prompt);
}
return returnValue;
}
template<typename inputType>
inputType ReadValue(std::string prompt, inputType minValue, inputType maxValue)
{
inputType returnValue=0;
returnValue=ReadValue<inputType>(prompt,minValue);
while (returnValue > maxValue) {
std::cout << "Error! Value must be <= " << maxValue << std::endl;
returnValue=ReadValue<inputType>(prompt,minValue);
}
return returnValue;
}
@@ -0,0 +1,44 @@
#include <iostream>
#include "doublylinkedlist.hpp"
#include "input.h"
using namespace std;
int main()
{
DoublyLinkedList dll = DoublyLinkedList();
cout << "1. Add Value" << endl;
cout << "2. Delete Value" << endl;
cout << "3. Display List (forward)" << endl;
cout << "4. Display List (backward)" << endl;
cout << "5. Quit" << endl;
int choice = ReadValue<int>("Enter Your Choice: ");
do {
if (choice == 1) {
dll.Insert(ReadValue<double>("Enter Your Data: "));
} else if (choice == 2) {
dll.Remove(ReadValue<int>("Enter The Index: "));
} else if (choice == 3) {
dll.DisplayFB();
} else if (choice == 4) {
dll.DisplayBF();
} else if (choice == 5) {
break;
} else {
cout << "Try Again" << endl;
}
// cout << "1. Add Value" << endl;
// cout << "2. Delete Value" << endl;
// cout << "3. Display List (forward)" << endl;
// cout << "4. Display List (backward)" << endl;
// cout << "5. Quit" << endl;
choice = ReadValue<int>("Enter Your Choice: ");
} while (choice != 5);
return 0;
}
@@ -0,0 +1,16 @@
//
// node.cpp
// DoublyLinkedList
//
// Created by Austin Bennett on 7/18/22.
//
#include "node.hpp"
Node::Node(double value) {
data = value;
}
Node::~Node() {
delete this;
}
@@ -0,0 +1,22 @@
//
// node.hpp
// DoublyLinkedList
//
// Created by Austin Bennett on 7/18/22.
//
#ifndef node_hpp
#define node_hpp
#include <stdio.h>
struct Node {
public:
double data;
struct Node *prev;
struct Node *next;
Node(double value);
~Node();
};
#endif /* node_hpp */