Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Rachels Courses
cs250 basic data structures with cpp
Commits
716e44ae
Commit
716e44ae
authored
Sep 21, 2020
by
Rachel Wil Sha Singh
💬
Browse files
2020-09-21 class stuff
parent
46ef8353
Changes
198
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
197511 additions
and
0 deletions
+197511
-0
class-stuff/2020-09-21/00 Linked List Diagram/00 Linked List Diagram.dia
...0-09-21/00 Linked List Diagram/00 Linked List Diagram.dia
+0
-0
class-stuff/2020-09-21/01 Nodes/Node.hpp
class-stuff/2020-09-21/01 Nodes/Node.hpp
+31
-0
class-stuff/2020-09-21/01 Nodes/Nodes.cbp
class-stuff/2020-09-21/01 Nodes/Nodes.cbp
+38
-0
class-stuff/2020-09-21/01 Nodes/Nodes.cbp.save
class-stuff/2020-09-21/01 Nodes/Nodes.cbp.save
+38
-0
class-stuff/2020-09-21/01 Nodes/Nodes.layout
class-stuff/2020-09-21/01 Nodes/Nodes.layout
+15
-0
class-stuff/2020-09-21/01 Nodes/main.cpp
class-stuff/2020-09-21/01 Nodes/main.cpp
+77
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/SearchSortLab.cbp
...stuff/2020-09-21/02 CS200 SearchSortLab/SearchSortLab.cbp
+50
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/SearchSortLab.depend
...ff/2020-09-21/02 CS200 SearchSortLab/SearchSortLab.depend
+64
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/SearchSortLab.layout
...ff/2020-09-21/02 CS200 SearchSortLab/SearchSortLab.layout
+60
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/animal.cpp
class-stuff/2020-09-21/02 CS200 SearchSortLab/animal.cpp
+56
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/animal.hpp
class-stuff/2020-09-21/02 CS200 SearchSortLab/animal.hpp
+31
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/data/Animal_Services_Intake_Data.csv
... CS200 SearchSortLab/data/Animal_Services_Intake_Data.csv
+187594
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/data/data source.txt
...ff/2020-09-21/02 CS200 SearchSortLab/data/data source.txt
+1
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/main.cpp
class-stuff/2020-09-21/02 CS200 SearchSortLab/main.cpp
+100
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/menu.hpp
class-stuff/2020-09-21/02 CS200 SearchSortLab/menu.hpp
+163
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/parser.cpp
class-stuff/2020-09-21/02 CS200 SearchSortLab/parser.cpp
+63
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/parser.hpp
class-stuff/2020-09-21/02 CS200 SearchSortLab/parser.hpp
+16
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/search.cpp
class-stuff/2020-09-21/02 CS200 SearchSortLab/search.cpp
+42
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/search.hpp
class-stuff/2020-09-21/02 CS200 SearchSortLab/search.hpp
+13
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/sort.cpp
class-stuff/2020-09-21/02 CS200 SearchSortLab/sort.cpp
+126
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/sort.hpp
class-stuff/2020-09-21/02 CS200 SearchSortLab/sort.hpp
+18
-0
class-stuff/2020-09-21/02 CS200 SearchSortLab/timer.hpp
class-stuff/2020-09-21/02 CS200 SearchSortLab/timer.hpp
+32
-0
class-stuff/2020-09-21/03 Algorithm Efficiency Notes/Notes - Algorithm Efficiency.pdf
...gorithm Efficiency Notes/Notes - Algorithm Efficiency.pdf
+0
-0
class-stuff/2020-09-21/04 Fibonacci Iterative vs Recursive/Fibonacci Iterative vs Recursive.cbp
...erative vs Recursive/Fibonacci Iterative vs Recursive.cbp
+37
-0
class-stuff/2020-09-21/04 Fibonacci Iterative vs Recursive/Fibonacci Iterative vs Recursive.cbp.save
...ve vs Recursive/Fibonacci Iterative vs Recursive.cbp.save
+37
-0
class-stuff/2020-09-21/04 Fibonacci Iterative vs Recursive/Fibonacci Iterative vs Recursive.depend
...tive vs Recursive/Fibonacci Iterative vs Recursive.depend
+4
-0
class-stuff/2020-09-21/04 Fibonacci Iterative vs Recursive/Fibonacci Iterative vs Recursive.layout
...tive vs Recursive/Fibonacci Iterative vs Recursive.layout
+10
-0
class-stuff/2020-09-21/04 Fibonacci Iterative vs Recursive/fib.cpp
...ff/2020-09-21/04 Fibonacci Iterative vs Recursive/fib.cpp
+66
-0
class-stuff/2020-09-21/05 Growth Rates/Growth Rates.cbp
class-stuff/2020-09-21/05 Growth Rates/Growth Rates.cbp
+37
-0
class-stuff/2020-09-21/05 Growth Rates/Growth Rates.cbp.save
class-stuff/2020-09-21/05 Growth Rates/Growth Rates.cbp.save
+37
-0
class-stuff/2020-09-21/05 Growth Rates/Growth Rates.depend
class-stuff/2020-09-21/05 Growth Rates/Growth Rates.depend
+7
-0
class-stuff/2020-09-21/05 Growth Rates/Growth Rates.layout
class-stuff/2020-09-21/05 Growth Rates/Growth Rates.layout
+10
-0
class-stuff/2020-09-21/05 Growth Rates/growthRates.cpp
class-stuff/2020-09-21/05 Growth Rates/growthRates.cpp
+160
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/DataStructure/LinkedList.hpp
...ject 2 - Linked List Starter/DataStructure/LinkedList.hpp
+351
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/Doxyfile
...ff/2020-09-21/06 Project 2 - Linked List Starter/Doxyfile
+2427
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/Exceptions/NotImplementedException.hpp
...inked List Starter/Exceptions/NotImplementedException.hpp
+15
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/Program.hpp
...2020-09-21/06 Project 2 - Linked List Starter/Program.hpp
+6
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/Project-CodeBlocks/CS250-Project02-List.cbp
... List Starter/Project-CodeBlocks/CS250-Project02-List.cbp
+45
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/Project-CodeBlocks/CS250-Project02-List.cbp.save
... Starter/Project-CodeBlocks/CS250-Project02-List.cbp.save
+45
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/Project-CodeBlocks/CS250-Project02-List.depend
...st Starter/Project-CodeBlocks/CS250-Project02-List.depend
+109
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/Project-CodeBlocks/CS250-Project02-List.layout
...st Starter/Project-CodeBlocks/CS250-Project02-List.layout
+50
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/Project-VisualStudio/CS250-Project02-LinkedList.sln
...arter/Project-VisualStudio/CS250-Project02-LinkedList.sln
+31
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/Project-VisualStudio/CS250-Project02-LinkedList/CS250-Project02-LinkedList.vcxproj
...0-Project02-LinkedList/CS250-Project02-LinkedList.vcxproj
+133
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/Project-VisualStudio/CS250-Project02-LinkedList/CS250-Project02-LinkedList.vcxproj.filters
...t02-LinkedList/CS250-Project02-LinkedList.vcxproj.filters
+45
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/Tester.hpp
.../2020-09-21/06 Project 2 - Linked List Starter/Tester.hpp
+1458
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/cuTEST/Menu.hpp
...-09-21/06 Project 2 - Linked List Starter/cuTEST/Menu.hpp
+163
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/cuTEST/README.md
...09-21/06 Project 2 - Linked List Starter/cuTEST/README.md
+121
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/cuTEST/StringUtil.hpp
.../06 Project 2 - Linked List Starter/cuTEST/StringUtil.hpp
+40
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/cuTEST/TesterBase.cpp
.../06 Project 2 - Linked List Starter/cuTEST/TesterBase.cpp
+313
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/cuTEST/TesterBase.hpp
.../06 Project 2 - Linked List Starter/cuTEST/TesterBase.hpp
+106
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/LinkedList_8hpp_source.html
... 2 - Linked List Starter/docs/LinkedList_8hpp_source.html
+121
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/Menu_8hpp_source.html
...roject 2 - Linked List Starter/docs/Menu_8hpp_source.html
+101
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/Program_8hpp_source.html
...ect 2 - Linked List Starter/docs/Program_8hpp_source.html
+95
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/StringUtil_8hpp_source.html
... 2 - Linked List Starter/docs/StringUtil_8hpp_source.html
+102
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/TesterBase_8hpp_source.html
... 2 - Linked List Starter/docs/TesterBase_8hpp_source.html
+102
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/Tester_8hpp_source.html
...ject 2 - Linked List Starter/docs/Tester_8hpp_source.html
+113
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/annotated.html
...21/06 Project 2 - Linked List Starter/docs/annotated.html
+110
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/arrowdown.png
...-21/06 Project 2 - Linked List Starter/docs/arrowdown.png
+0
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/arrowright.png
...21/06 Project 2 - Linked List Starter/docs/arrowright.png
+0
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/bc_s.png
...20-09-21/06 Project 2 - Linked List Starter/docs/bc_s.png
+0
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/bdwn.png
...20-09-21/06 Project 2 - Linked List Starter/docs/bdwn.png
+0
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classLinkedList-members.html
...2 - Linked List Starter/docs/classLinkedList-members.html
+120
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classLinkedList.html
...Project 2 - Linked List Starter/docs/classLinkedList.html
+577
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classMenu-members.html
...oject 2 - Linked List Starter/docs/classMenu-members.html
+113
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classMenu.html
...21/06 Project 2 - Linked List Starter/docs/classMenu.html
+144
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classSU-members.html
...Project 2 - Linked List Starter/docs/classSU-members.html
+103
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classSU.html
...9-21/06 Project 2 - Linked List Starter/docs/classSU.html
+114
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classStringUtil-members.html
...2 - Linked List Starter/docs/classStringUtil-members.html
+104
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classStringUtil.html
...Project 2 - Linked List Starter/docs/classStringUtil.html
+117
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classTester-members.html
...ect 2 - Linked List Starter/docs/classTester-members.html
+163
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classTester.html
.../06 Project 2 - Linked List Starter/docs/classTester.html
+302
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classTesterBase-members.html
...2 - Linked List Starter/docs/classTesterBase-members.html
+149
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classTesterBase.html
...Project 2 - Linked List Starter/docs/classTesterBase.html
+261
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classTesterBase__inherit__graph.dot
...ked List Starter/docs/classTesterBase__inherit__graph.dot
+8
-0
class-stuff/2020-09-21/06 Project 2 - Linked List Starter/docs/classTesterBase__inherit__graph.md5
...ked List Starter/docs/classTesterBase__inherit__graph.md5
+1
-0
No files found.
class-stuff/2020-09-21/00 Linked List Diagram/00 Linked List Diagram.dia
0 → 100644
View file @
716e44ae
File added
class-stuff/2020-09-21/01 Nodes/Node.hpp
0 → 100644
View file @
716e44ae
#ifndef _NODE_HPP
#define _NODE_HPP
#include <iomanip>
#include <iostream>
using
namespace
std
;
template
<
typename
T
>
class
Node
{
public:
Node
()
{
ptrPrev
=
nullptr
;
ptrNext
=
nullptr
;
}
void
Display
()
{
cout
<<
left
<<
setw
(
10
)
<<
data
<<
setw
(
20
)
<<
ptrPrev
<<
setw
(
20
)
<<
ptrNext
<<
endl
;
}
T
data
;
Node
*
ptrNext
;
Node
*
ptrPrev
;
};
#endif
class-stuff/2020-09-21/01 Nodes/Nodes.cbp
0 → 100644
View file @
716e44ae
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion
major=
"1"
minor=
"6"
/>
<Project>
<Option
title=
"Nodes"
/>
<Option
pch_mode=
"2"
/>
<Option
compiler=
"gcc"
/>
<Build>
<Target
title=
"Debug"
>
<Option
output=
"bin/Debug/Nodes"
prefix_auto=
"1"
extension_auto=
"1"
/>
<Option
object_output=
"obj/Debug/"
/>
<Option
type=
"1"
/>
<Option
compiler=
"gcc"
/>
<Compiler>
<Add
option=
"-g"
/>
</Compiler>
</Target>
<Target
title=
"Release"
>
<Option
output=
"bin/Release/Nodes"
prefix_auto=
"1"
extension_auto=
"1"
/>
<Option
object_output=
"obj/Release/"
/>
<Option
type=
"1"
/>
<Option
compiler=
"gcc"
/>
<Compiler>
<Add
option=
"-O2"
/>
</Compiler>
<Linker>
<Add
option=
"-s"
/>
</Linker>
</Target>
</Build>
<Compiler>
<Add
option=
"-Wall"
/>
</Compiler>
<Unit
filename=
"Node.hpp"
/>
<Unit
filename=
"main.cpp"
/>
<Extensions
/>
</Project>
</CodeBlocks_project_file>
class-stuff/2020-09-21/01 Nodes/Nodes.cbp.save
0 → 100644
View file @
716e44ae
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion
major=
"1"
minor=
"6"
/>
<Project>
<Option
title=
"Nodes"
/>
<Option
pch_mode=
"2"
/>
<Option
compiler=
"gcc"
/>
<Build>
<Target
title=
"Debug"
>
<Option
output=
"bin/Debug/Nodes"
prefix_auto=
"1"
extension_auto=
"1"
/>
<Option
object_output=
"obj/Debug/"
/>
<Option
type=
"1"
/>
<Option
compiler=
"gcc"
/>
<Compiler>
<Add
option=
"-g"
/>
</Compiler>
</Target>
<Target
title=
"Release"
>
<Option
output=
"bin/Release/Nodes"
prefix_auto=
"1"
extension_auto=
"1"
/>
<Option
object_output=
"obj/Release/"
/>
<Option
type=
"1"
/>
<Option
compiler=
"gcc"
/>
<Compiler>
<Add
option=
"-O2"
/>
</Compiler>
<Linker>
<Add
option=
"-s"
/>
</Linker>
</Target>
</Build>
<Compiler>
<Add
option=
"-Wall"
/>
</Compiler>
<Unit
filename=
"Node.hpp"
/>
<Unit
filename=
"main.cpp"
/>
<Extensions
/>
</Project>
</CodeBlocks_project_file>
class-stuff/2020-09-21/01 Nodes/Nodes.layout
0 → 100644
View file @
716e44ae
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion
major=
"1"
minor=
"0"
/>
<ActiveTarget
name=
"Debug"
/>
<File
name=
"main.cpp"
open=
"1"
top=
"1"
tabpos=
"1"
split=
"0"
active=
"1"
splitpos=
"0"
zoom_1=
"0"
zoom_2=
"0"
>
<Cursor>
<Cursor1
position=
"640"
topLine=
"21"
/>
</Cursor>
</File>
<File
name=
"Node.hpp"
open=
"1"
top=
"0"
tabpos=
"2"
split=
"0"
active=
"1"
splitpos=
"0"
zoom_1=
"0"
zoom_2=
"0"
>
<Cursor>
<Cursor1
position=
"376"
topLine=
"0"
/>
</Cursor>
</File>
</CodeBlocks_layout_file>
class-stuff/2020-09-21/01 Nodes/main.cpp
0 → 100644
View file @
716e44ae
#include <iostream>
#include <iomanip>
#include <string>
using
namespace
std
;
#include "Node.hpp"
void
OneNode
()
{
cout
<<
endl
<<
"ONE NODE"
<<
endl
;
cout
<<
left
<<
setw
(
10
)
<<
"data"
<<
setw
(
20
)
<<
"prev"
<<
setw
(
20
)
<<
"next"
<<
endl
;
cout
<<
"----------------------------------------------"
<<
endl
;
Node
<
string
>
node
;
node
.
data
=
"one node"
;
node
.
Display
();
}
void
TwoNodes
()
{
cout
<<
endl
<<
"TWO NODES"
<<
endl
;
cout
<<
left
<<
setw
(
10
)
<<
"data"
<<
setw
(
20
)
<<
"prev"
<<
setw
(
20
)
<<
"next"
<<
endl
;
cout
<<
"----------------------------------------------"
<<
endl
;
Node
<
string
>
node1
,
node2
;
node1
.
data
=
"first"
;
node2
.
data
=
"second"
;
node1
.
ptrNext
=
&
node2
;
node2
.
ptrPrev
=
&
node1
;
node1
.
Display
();
node2
.
Display
();
}
void
ThreeNodes
()
{
cout
<<
endl
<<
"THREE NODES"
<<
endl
;
cout
<<
left
<<
setw
(
10
)
<<
"data"
<<
setw
(
20
)
<<
"prev"
<<
setw
(
20
)
<<
"next"
<<
endl
;
cout
<<
"----------------------------------------------"
<<
endl
;
Node
<
string
>
node1
,
node2
,
node3
;
node1
.
data
=
"first"
;
node2
.
data
=
"second"
;
node3
.
data
=
"third"
;
node1
.
ptrNext
=
&
node2
;
node2
.
ptrPrev
=
&
node1
;
node2
.
ptrNext
=
&
node3
;
node3
.
ptrPrev
=
&
node2
;
node1
.
Display
();
node2
.
Display
();
node3
.
Display
();
}
int
main
()
{
OneNode
();
TwoNodes
();
ThreeNodes
();
return
0
;
}
class-stuff/2020-09-21/02 CS200 SearchSortLab/SearchSortLab.cbp
0 → 100755
View file @
716e44ae
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion
major=
"1"
minor=
"6"
/>
<Project>
<Option
title=
"SearchSortLab"
/>
<Option
pch_mode=
"2"
/>
<Option
compiler=
"gcc"
/>
<Build>
<Target
title=
"Debug"
>
<Option
output=
"bin/Debug/SearchSortLab"
prefix_auto=
"1"
extension_auto=
"1"
/>
<Option
object_output=
"obj/Debug/"
/>
<Option
type=
"1"
/>
<Option
compiler=
"gcc"
/>
<Compiler>
<Add
option=
"-g"
/>
</Compiler>
</Target>
<Target
title=
"Release"
>
<Option
output=
"bin/Release/SearchSortLab"
prefix_auto=
"1"
extension_auto=
"1"
/>
<Option
object_output=
"obj/Release/"
/>
<Option
type=
"1"
/>
<Option
compiler=
"gcc"
/>
<Compiler>
<Add
option=
"-O2"
/>
</Compiler>
<Linker>
<Add
option=
"-s"
/>
</Linker>
</Target>
</Build>
<Compiler>
<Add
option=
"-Wall"
/>
</Compiler>
<Unit
filename=
"animal.cpp"
/>
<Unit
filename=
"animal.hpp"
/>
<Unit
filename=
"main.cpp"
/>
<Unit
filename=
"menu.hpp"
/>
<Unit
filename=
"parser.cpp"
/>
<Unit
filename=
"parser.hpp"
/>
<Unit
filename=
"search.cpp"
/>
<Unit
filename=
"search.hpp"
/>
<Unit
filename=
"sort.cpp"
/>
<Unit
filename=
"sort.hpp"
/>
<Unit
filename=
"timer.hpp"
/>
<Extensions>
<code_completion
/>
<debugger
/>
</Extensions>
</Project>
</CodeBlocks_project_file>
class-stuff/2020-09-21/02 CS200 SearchSortLab/SearchSortLab.depend
0 → 100755
View file @
716e44ae
# depslib dependency file v1.0
1593112728 source:/home/wilsha/TEACHING/cs200-concepts-of-progamming-algorithms/2020/Labs/08 Search and Sort/SearchSortLab/main.cpp
"search.hpp"
"sort.hpp"
"parser.hpp"
"menu.hpp"
1593110098 /home/wilsha/TEACHING/cs200-concepts-of-progamming-algorithms/2020/Labs/08 Search and Sort/SearchSortLab/search.hpp
<string>
<vector>
"animal.hpp"
1593111257 /home/wilsha/TEACHING/cs200-concepts-of-progamming-algorithms/2020/Labs/08 Search and Sort/SearchSortLab/sort.hpp
<vector>
<string>
"animal.hpp"
1593110025 /home/wilsha/TEACHING/cs200-concepts-of-progamming-algorithms/2020/Labs/08 Search and Sort/SearchSortLab/helpers.hpp
<iostream>
<fstream>
<string>
<vector>
"timer.hpp"
"animal.hpp"
1593109727 source:/home/wilsha/TEACHING/cs200-concepts-of-progamming-algorithms/2020/Labs/08 Search and Sort/SearchSortLab/search.cpp
"search.hpp"
1593111599 source:/home/wilsha/TEACHING/cs200-concepts-of-progamming-algorithms/2020/Labs/08 Search and Sort/SearchSortLab/sort.cpp
"sort.hpp"
<iostream>
"menu.hpp"
1593108102 /home/wilsha/TEACHING/cs200-concepts-of-progamming-algorithms/2020/Labs/08 Search and Sort/SearchSortLab/timer.hpp
<chrono>
1593108496 /home/wilsha/TEACHING/cs200-concepts-of-progamming-algorithms/2020/Labs/08 Search and Sort/SearchSortLab/menu.hpp
<iostream>
<string>
<vector>
<cstdlib>
<limits>
1593109843 source:/home/wilsha/TEACHING/cs200-concepts-of-progamming-algorithms/2020/Labs/08 Search and Sort/SearchSortLab/helpers.cpp
"helpers.hpp"
1593111593 source:/home/wilsha/TEACHING/cs200-concepts-of-progamming-algorithms/2020/Labs/08 Search and Sort/SearchSortLab/animal.cpp
"animal.hpp"
<iostream>
1593111584 /home/wilsha/TEACHING/cs200-concepts-of-progamming-algorithms/2020/Labs/08 Search and Sort/SearchSortLab/animal.hpp
<string>
1593110188 source:/home/wilsha/TEACHING/cs200-concepts-of-progamming-algorithms/2020/Labs/08 Search and Sort/SearchSortLab/parser.cpp
"parser.hpp"
1593110061 /home/wilsha/TEACHING/cs200-concepts-of-progamming-algorithms/2020/Labs/08 Search and Sort/SearchSortLab/parser.hpp
<iostream>
<fstream>
<string>
<vector>
"timer.hpp"
"animal.hpp"
class-stuff/2020-09-21/02 CS200 SearchSortLab/SearchSortLab.layout
0 → 100755
View file @
716e44ae
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion
major=
"1"
minor=
"0"
/>
<ActiveTarget
name=
"Debug"
/>
<File
name=
"parser.cpp"
open=
"0"
top=
"0"
tabpos=
"0"
split=
"0"
active=
"1"
splitpos=
"0"
zoom_1=
"0"
zoom_2=
"0"
>
<Cursor>
<Cursor1
position=
"1273"
topLine=
"30"
/>
</Cursor>
</File>
<File
name=
"sort.cpp"
open=
"0"
top=
"0"
tabpos=
"0"
split=
"0"
active=
"1"
splitpos=
"0"
zoom_1=
"0"
zoom_2=
"0"
>
<Cursor>
<Cursor1
position=
"1909"
topLine=
"51"
/>
</Cursor>
</File>
<File
name=
"timer.hpp"
open=
"0"
top=
"0"
tabpos=
"0"
split=
"0"
active=
"1"
splitpos=
"0"
zoom_1=
"0"
zoom_2=
"0"
>
<Cursor>
<Cursor1
position=
"192"
topLine=
"5"
/>
</Cursor>
</File>
<File
name=
"main.cpp"
open=
"1"
top=
"1"
tabpos=
"1"
split=
"0"
active=
"1"
splitpos=
"0"
zoom_1=
"0"
zoom_2=
"0"
>
<Cursor>
<Cursor1
position=
"136"
topLine=
"12"
/>
</Cursor>
</File>
<File
name=
"search.hpp"
open=
"0"
top=
"0"
tabpos=
"0"
split=
"0"
active=
"1"
splitpos=
"0"
zoom_1=
"0"
zoom_2=
"0"
>
<Cursor>
<Cursor1
position=
"115"
topLine=
"0"
/>
</Cursor>
</File>
<File
name=
"animal.cpp"
open=
"1"
top=
"0"
tabpos=
"3"
split=
"0"
active=
"1"
splitpos=
"0"
zoom_1=
"0"
zoom_2=
"0"
>
<Cursor>
<Cursor1
position=
"1147"
topLine=
"27"
/>
</Cursor>
</File>
<File
name=
"parser.hpp"
open=
"0"
top=
"0"
tabpos=
"0"
split=
"0"
active=
"1"
splitpos=
"0"
zoom_1=
"0"
zoom_2=
"0"
>
<Cursor>
<Cursor1
position=
"39"
topLine=
"0"
/>
</Cursor>
</File>
<File
name=
"sort.hpp"
open=
"0"
top=
"0"
tabpos=
"0"
split=
"0"
active=
"1"
splitpos=
"0"
zoom_1=
"0"
zoom_2=
"0"
>
<Cursor>
<Cursor1
position=
"203"
topLine=
"0"
/>
</Cursor>
</File>
<File
name=
"menu.hpp"
open=
"0"
top=
"0"
tabpos=
"0"
split=
"0"
active=
"1"
splitpos=
"0"
zoom_1=
"0"
zoom_2=
"0"
>
<Cursor>
<Cursor1
position=
"3340"
topLine=
"136"
/>
</Cursor>
</File>
<File
name=
"animal.hpp"
open=
"1"
top=
"0"
tabpos=
"2"
split=
"0"
active=
"1"
splitpos=
"0"
zoom_1=
"0"
zoom_2=
"0"
>
<Cursor>
<Cursor1
position=
"39"
topLine=
"0"
/>
</Cursor>
</File>
<File
name=
"search.cpp"
open=
"0"
top=
"0"
tabpos=
"0"
split=
"0"
active=
"1"
splitpos=
"0"
zoom_1=
"0"
zoom_2=
"0"
>
<Cursor>
<Cursor1
position=
"670"
topLine=
"0"
/>
</Cursor>
</File>
</CodeBlocks_layout_file>
class-stuff/2020-09-21/02 CS200 SearchSortLab/animal.cpp
0 → 100755
View file @
716e44ae
#include "animal.hpp"
#include <iostream>
using
namespace
std
;
void
Animal
::
Display
()
{
cout
<<
endl
;
cout
<<
"Animal ID: "
<<
id
<<
endl
<<
"Shelter: "
<<
shelter
<<
endl
<<
"Intake date: "
<<
intakeDate
<<
endl
<<
"Intake type: "
<<
intakeType
<<
endl
<<
"Intake condition: "
<<
intakeCondition
<<
endl
<<
"Animal type: "
<<
type
<<
endl
<<
"Group: "
<<
group
<<
endl
<<
"Breed: "
<<
breed
<<
endl
;
cout
<<
endl
;
}
Animal
&
Animal
::
operator
=
(
const
Animal
&
other
)
{
this
->
id
=
other
.
id
;
this
->
breed
=
other
.
breed
;
this
->
type
=
other
.
type
;
return
*
this
;
}
bool
operator
==
(
Animal
&
a1
,
Animal
&
a2
)
{
return
(
a1
.
id
==
a2
.
id
);
}
bool
operator
!=
(
Animal
&
a1
,
Animal
&
a2
)
{
return
!
(
a1
.
id
==
a2
.
id
);
}
bool
operator
<
(
Animal
&
a1
,
Animal
&
a2
)
{
return
(
a1
.
id
<
a2
.
id
);
}
bool
operator
>
(
Animal
&
a1
,
Animal
&
a2
)
{
return
(
a1
.
id
>
a2
.
id
);
}
bool
operator
<=
(
Animal
&
a1
,
Animal
&
a2
)
{
return
(
a1
.
id
<=
a2
.
id
);
}
bool
operator
>=
(
Animal
&
a1
,
Animal
&
a2
)
{
return
(
a1
.
id
>=
a2
.
id
);
}
class-stuff/2020-09-21/02 CS200 SearchSortLab/animal.hpp
0 → 100755
View file @
716e44ae
#ifndef _ANIMAL_HPP
#define _ANIMAL_HPP
#include <string>
using
namespace
std
;
class
Animal
{
public:
string
id
;
string
shelter
;
string
type
;
string
breed
;
string
intakeDate
;
string
intakeType
;
string
intakeCondition
;
string
group
;
void
Display
();
Animal
&
operator
=
(
const
Animal
&
other
);
friend
bool
operator
==
(
Animal
&
a1
,
Animal
&
a2
);
friend
bool
operator
!=
(
Animal
&
a1
,
Animal
&
a2
);
friend
bool
operator
<
(
Animal
&
a1
,
Animal
&
a2
);
friend
bool
operator
>
(
Animal
&
a1
,
Animal
&
a2
);
friend
bool
operator
<=
(
Animal
&
a1
,
Animal
&
a2
);
friend
bool
operator
>=
(
Animal
&
a1
,
Animal
&
a2
);
};
#endif
class-stuff/2020-09-21/02 CS200 SearchSortLab/data/Animal_Services_Intake_Data.csv
0 → 100755
View file @
716e44ae
This diff is collapsed.
Click to expand it.
class-stuff/2020-09-21/02 CS200 SearchSortLab/data/data source.txt
0 → 100755
View file @
716e44ae
https://catalog.data.gov/dataset/animal-services-intake-data-57f73
class-stuff/2020-09-21/02 CS200 SearchSortLab/main.cpp
0 → 100755
View file @
716e44ae
#include "search.hpp"
#include "sort.hpp"
#include "parser.hpp"
#include "menu.hpp"
int
main
()
{
vector
<
Animal
>
animals
;
LoadCsvData
(
"data/Animal_Services_Intake_Data.csv"
,
animals
);
bool
done
=
false
;
while
(
!
done
)
{
Menu
::
Header
(
"Main Menu"
);
int
choice
=
Menu
::
ShowIntMenuWithPrompt
(
{
"Sort animals"
,
"Search for animal by ID"
}
);
if
(
choice
==
1
)
{
Menu
::
Header
(
"Sort animal IDs"
);
int
sortChoice
=
Menu
::
ShowIntMenuWithPrompt
(
{
"Insertion sort"
,
"Selection sort"
,
"Merge sort"
}
);
if
(
sortChoice
==
1
)
{
Timer
timer
;
timer
.
Start
();
cout
<<
"Beginning Insertion Sort..."
<<
endl
;
InsertionSort
(
animals
);
cout
<<
"* Sort completed ("
<<
timer
.
GetElapsedMilliseconds
()
<<
" milliseconds)"
<<
endl
;
}
else
if
(
sortChoice
==
2
)
{
Timer
timer
;
timer
.
Start
();
cout
<<
"Beginning Selection Sort..."
<<
endl
;
SelectionSort
(
animals
);
cout
<<
"* Sort completed ("
<<
timer
.
GetElapsedMilliseconds
()
<<
" milliseconds)"
<<
endl
;
}
else
{
Timer
timer
;
timer
.
Start
();
cout
<<
"Beginning Merge Sort..."
<<
endl
;
MergeSort
(
animals
,
0
,
animals
.
size
()
-
1
);
cout
<<
"* Sort completed ("
<<
timer
.
GetElapsedMilliseconds
()
<<
" milliseconds)"
<<
endl
;
}
}
else
if
(
choice
==
2
)
{
Menu
::
Header
(
"Search for animal by ID"
);
string
id
=
Menu
::
GetStringChoice
(
"Enter the Animal ID"
);
int
searchChoice
=
Menu
::
ShowIntMenuWithPrompt
(
{
"Linear search"
,
"Binary search"
}
);
int
foundIndex
=
-
1
;
if
(
searchChoice
==
1
)
{
Timer
timer
;
timer
.
Start
();
cout
<<
"Beginning L