Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Welp. As Good as i could get it.. oof #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CST136SRS02.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2036
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Waka", "Waka\Waka.vcxproj", "{5FEF05EA-51EF-44E8-98F5-A9FC2195A738}"
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
{5FEF05EA-51EF-44E8-98F5-A9FC2195A738}.Debug|x64.ActiveCfg = Debug|x64
{5FEF05EA-51EF-44E8-98F5-A9FC2195A738}.Debug|x64.Build.0 = Debug|x64
{5FEF05EA-51EF-44E8-98F5-A9FC2195A738}.Debug|x86.ActiveCfg = Debug|Win32
{5FEF05EA-51EF-44E8-98F5-A9FC2195A738}.Debug|x86.Build.0 = Debug|Win32
{5FEF05EA-51EF-44E8-98F5-A9FC2195A738}.Release|x64.ActiveCfg = Release|x64
{5FEF05EA-51EF-44E8-98F5-A9FC2195A738}.Release|x64.Build.0 = Release|x64
{5FEF05EA-51EF-44E8-98F5-A9FC2195A738}.Release|x86.ActiveCfg = Release|Win32
{5FEF05EA-51EF-44E8-98F5-A9FC2195A738}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {331E2184-AB62-4393-A372-09F1F802D21B}
EndGlobalSection
EndGlobal
Binary file added CST136SRS02/CST136SRS02.cpp
Binary file not shown.
165 changes: 165 additions & 0 deletions CST136SRS02/CST136SRS02.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{B5E4D46D-6227-4FB7-9B44-4F713D8A4A81}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>CST136SRS02</RootNamespace>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="CST136SRS02.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
33 changes: 33 additions & 0 deletions CST136SRS02/CST136SRS02.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="CST136SRS02.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
Binary file added CST136SRS02/stdafx.cpp
Binary file not shown.
Binary file added CST136SRS02/stdafx.h
Binary file not shown.
Binary file added CST136SRS02/targetver.h
Binary file not shown.
75 changes: 55 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,81 @@
# CST136SRS02
Polynesian Polymorphism

Name:
Name: Forrest Warner

Notes:

-no cin && no cout
-Classes that contain at least one pure virtual function are known as abstract base classes.

---

Failures/Errors:

-unable to link Water/Wind to Boat.
-no demo, not even for raft... :(
-Hull base class and sub classes dont function properly
-Sail has no interaction with Wind
-Paddle has little interaction with Water
-Some of my dtors aren't working correctly
-Propulsion Sail is not limited to Sailboat(unimplemented)

Successes:

-Navigation/Chart work properly
-Raft successfully constructs
-Most of the classes are almost setup completely (even if not all properly)
-I learned a lot about virtual/abstract/augment/override and more.

---

Purpose:

- Learn C++ Polymorphism
- Practice creating classes
- Understand abstraction and abstract classes
[*] Learn C++ Polymorphism
[*] Practice creating classes
[*] Understand abstraction and abstract classes

[*] Project Name: Waka

In this assignment you will create different boats to take you on your voyage around the Pacific Ocean. You already have all the safety gear and the knowledge to use it should you run across rough seas. Many wonders await you, but before you do that, you must make sure you can handle your boat, so we will be sticking close to the coast of New Zealand.

You will create 3 different types of boats. A raft, a canoe, and a sailboat. Only a sailboat may have a sail.
[*] You will create 3 different types of boats. A raft, a canoe, and a sailboat.

[] Only a sailboat may have a sail.

[*] You must name each of your boats for them to have [mana](https://en.wikipedia.org/wiki/Mana#M%C4%81ori_use).

You must name each of your boats for them to have [mana](https://en.wikipedia.org/wiki/Mana#M%C4%81ori_use).
[*] You will find the UML blueprints to assemble your boats in a file called Waka.png. [See: Waka](https://en.wikipedia.org/wiki/Waka_(canoe))

You will find the UML blueprints to assemble your boats in a file called Waka.png. [See: Waka](https://en.wikipedia.org/wiki/Waka_(canoe))
[] After you have assembled your boats to specification, take them on a test voyage.

After you have assembled your boats to specification, take them on a test voyage.
[*] Create a Wind and Current object as well as a Chart to keep track of your navigation.

Create a Wind and Current object as well as a Chart to keep track of your navigation.
[*] Your boats should turn more easily if MonoHull but be more stable if MultiHull. A MultiHull boat isn't as easy to capsize and your code should reflect this.

Your boats should turn more easily if MonoHull but be more stable if MultiHull.
[] A sail is greatly impacted by the wind and can never move you within +-45 degrees of direction of the wind. Doing so will capsize your boat. However, your speed will be greatly increased by a sail.

A sail is greatly impacted by the wind and can never move you within +-45 degrees of direction of the wind. Doing so will capsize your boat. However, your speed will be greatly increased by a sail. A MultiHull boat isn't as easy to capsize and your code should reflect this.
[*] A raft has no control and is only able to drift with the current.

A raft has no control and is only able to drift with the current.
[] Simulate the conditions of a voyage and chart your course around the entire coast of New Zealand. [See: feature_(NZLand).jpg](https://github.com/labermt/CST136SRS02/blob/master/nz.png)

Simulate the conditions of a voyage and chart your course around the entire coast of New Zealand. (See included map)
[] After you have tested your boats, be able to explain which one would be your choice for a trip across the Pacific Ocean.

After you have tested your boats, be able to explain which one would be your choice for a trip across the Pacific Ocean.
[] Feel free to add provisions and gear (compass, ropes, food, drinking water, ...) as you see fit. Also feel free to add any additional boat items such as an anchor, rudder, ...

Feel free to add provisions and gear (compass, ropes, food, drinking water, ...) as you see fit. Also feel free to add any additional boat items such as an anchor, rudder, ...
[] There are no points given for being fast or even successful navigation, your only goal is to create your boats to the UML specification, describe how you assembled them, and demo testing them.

There are no points given for being fast or even successful navigation, your only goal is to create your boats to the UML specification, describe how you assembled them, and demo testing them.
[] Be sure you account for rough seas in your simulation and have your safety gear ... urrr... code (assertions, exceptions, ...) ready and be able to demonstrate it functioning.

Be sure you account for rough seas in your simulation and have your safety gear ... urrr... code (assertions, exceptions, ...) ready and be able to demonstrate it functioning.
[*] If you have a destructor in any class, follow the guideline [C.35: A base class destructor should be either public and virtual, or protected and nonvirtual](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rc-dtor-virtual)

If you have a destructor in any class, follow the guideline [C.35: A base class destructor should be either public and virtual, or protected and nonvirtual](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rc-dtor-virtual)
[] If you want to refer to a concrete class in your code beyond construction, you must obtain permission from the master boat builder (aka your instructor).

[*] Be creative and have fun on your test voyage.

---

If you want to refer to a concrete class in your code beyond construction, you must obtain permission from the master boat builder (aka your instructor).
Citations:

Be creative and have fun on your test voyage.
- Referenced Old Loxadonta Project. Modified some methods initially coded by Professor Mitch Besser (specifically, methods from gps.cpp). [See: GitHub] (https://github.com/labermt/CST126SRS03/blob/master/CST126SRS03/gps.cpp)
- Read up on virtual member functions. [See:C++ FAQ](http://www.cs.technion.ac.il/users/yechiel/c++-faq/overview-virtual-fns.html)
Loading