summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordanHT-OIT <[email protected]>2021-12-08 17:08:42 -0800
committerJordanHT-OIT <[email protected]>2021-12-08 17:08:42 -0800
commit0c39f5f945969e60e47de7224102087debcfd281 (patch)
treeda61a651753a0171cd2739c83970393b9442ec8f
parentAdd online IDE url (diff)
downloadcst116-proj3-jordanht-oit-master.tar.xz
cst116-proj3-jordanht-oit-master.zip
Transferred Project GitHub to Class GitHubHEADmaster
Work was done within a different GitHub repo
-rw-r--r--.gitattributes63
-rw-r--r--.gitignore363
-rw-r--r--Agile-Question_Logs_Ansari.txt149
-rw-r--r--Agile_questions_Harris-Toovy.txt59
-rw-r--r--CST116F2021-Proj3.sln31
-rw-r--r--CST116F2021-Proj3/CST116F2021-Proj3.cpp20
-rw-r--r--CST116F2021-Proj3/CST116F2021-Proj3.vcxproj147
-rw-r--r--CST116F2021-Proj3/CST116F2021-Proj3.vcxproj.filters22
-rw-r--r--Flowchart.pngbin0 -> 56462 bytes
-rw-r--r--README.md1
-rw-r--r--Test Plan.txt76
-rw-r--r--Test Results.txt295
-rw-r--r--functionsAnsari.cpp62
-rw-r--r--functionsHarris-Toovy.cpp100
-rw-r--r--mainCode.cpp62
-rw-r--r--mainHeader.h33
16 files changed, 836 insertions, 647 deletions
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 1ff0c42..0000000
--- a/.gitattributes
+++ /dev/null
@@ -1,63 +0,0 @@
-###############################################################################
-# Set default behavior to automatically normalize line endings.
-###############################################################################
-* text=auto
-
-###############################################################################
-# Set default behavior for command prompt diff.
-#
-# This is need for earlier builds of msysgit that does not have it on by
-# default for csharp files.
-# Note: This is only used by command line
-###############################################################################
-#*.cs diff=csharp
-
-###############################################################################
-# Set the merge driver for project and solution files
-#
-# Merging from the command prompt will add diff markers to the files if there
-# are conflicts (Merging from VS is not affected by the settings below, in VS
-# the diff markers are never inserted). Diff markers may cause the following
-# file extensions to fail to load in VS. An alternative would be to treat
-# these files as binary and thus will always conflict and require user
-# intervention with every merge. To do so, just uncomment the entries below
-###############################################################################
-#*.sln merge=binary
-#*.csproj merge=binary
-#*.vbproj merge=binary
-#*.vcxproj merge=binary
-#*.vcproj merge=binary
-#*.dbproj merge=binary
-#*.fsproj merge=binary
-#*.lsproj merge=binary
-#*.wixproj merge=binary
-#*.modelproj merge=binary
-#*.sqlproj merge=binary
-#*.wwaproj merge=binary
-
-###############################################################################
-# behavior for image files
-#
-# image files are treated as binary by default.
-###############################################################################
-#*.jpg binary
-#*.png binary
-#*.gif binary
-
-###############################################################################
-# diff behavior for common document formats
-#
-# Convert binary document formats to text before diffing them. This feature
-# is only available from the command line. Turn it on by uncommenting the
-# entries below.
-###############################################################################
-#*.doc diff=astextplain
-#*.DOC diff=astextplain
-#*.docx diff=astextplain
-#*.DOCX diff=astextplain
-#*.dot diff=astextplain
-#*.DOT diff=astextplain
-#*.pdf diff=astextplain
-#*.PDF diff=astextplain
-#*.rtf diff=astextplain
-#*.RTF diff=astextplain
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 9491a2f..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,363 +0,0 @@
-## 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/master/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/
-[Oo]ut/
-[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
-*.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 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/
-
-# 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 \ No newline at end of file
diff --git a/Agile-Question_Logs_Ansari.txt b/Agile-Question_Logs_Ansari.txt
new file mode 100644
index 0000000..37d0d27
--- /dev/null
+++ b/Agile-Question_Logs_Ansari.txt
@@ -0,0 +1,149 @@
+PROJ 3: CST 116
+
+Main form of communication:
+
+Jordan Harris-Toovy is inviting you to a scheduled Zoom meeting.
+
+Topic: CST116 Project 3 meeting
+Time: Nov 29, 2021 06:00 PM Pacific Time (US and Canada)
+
+Join Zoom Meeting
+https://oregontechonline.zoom.us/j/6495417952?pwd=Y1h4TWNRRFRRUDNoajAzZ1RiTFBJQT09
+
+Meeting ID: 649 541 7952
+Passcode: 0DzXcC
+
+Join by Skype for Business
+https://oregontechonline.zoom.us/skype/6495417952
+
+Or
+
+
+
+In Person Meeting
+
+
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+Meeting: 11/13/2021
+
+Agile Question:
+Discuss the projects
+Separate general roles and who will do what
+The specific roles and functions we will take
+
+Discussed:
+-roles
+-I take the matrix operation functions
+-github setup
+
+Next meeting: 11/15/2021
+
+--------------------------------------------------------
+11/15/2021
+
+Agile Questions(Meeting through Zoom and Email):
+Discuss basic details of project 5
+We will be dividing the work/functions and possibly setting up the github
+What functions will be assigned to each person and whether the github will be resolved today
+Issues:
+Internet connection so we switched to email.
+Discussed:
+-How to fix github issue
+-How files will populated on github (.cpp and .h)
+-time of next meeting
+
+
+
+-------------------------------------------------------------------------------------------------------------------------------------
+Due to circumstances, was not able to make it to class in the 17th and meeting was not able to happen due to that
+------------------------------------------------------------------------------
+Meeting 11/20/2021
+
+Agile Question(meeting):
+Discuss with my partner the development of the function and main
+Partial code for the addition function has been completed and github fix
+The algorithm for the rest of the code.
+Discussed:
+Everything in the agile questions and github finally fixed
+---------------------------------------------------------------------------------
+
+Communication Gap due to Holidays (My end) although we did eventually get in touch.
+----------------------------------------------------------------------------------
+11/27/2021
+
+Agile Questions:
+discuss general updates
+What the other needs from one
+Integration issues
+
+
+What we discussed:
+-updates
+-Use floats as data type
+-Automatically adjust scale of the array
+-Possible to code to help with input function if time permits:
+#include <limits>
+cin.clear(); //Clear failure condition flag
+cin.ignore(numeric_limits<streamsize>::max(), '\n'); //Clears until next \n
+----------------------------------------------------------------------------------------------------------------------------
+12/1/2021
+
+Agile Questions(Meeting through zoom):
+Discuss general updates on how the progress is coming along
+Ask each other if they need something from the other in terms of integration
+Exact date of completion
+
+Discussed:
+-general updates
+
+
+-----------------------------------------------------------------------------------------------------------------------------
+12/4/2021
+
+Agile Questions(Meeting communication):
+
+Discuss Updates
+All my function completed besides multiplication due to a bug in the code
+Will it integrate into main on my partners side
+
+Discussed:
+-Completion of two function
+-Let him know functions have been completed
+
+
+-----------------------------------------------------------------------------------------------------------------------------
+12/6/2021
+
+
+4:16 PM
+Agile Questions(Meeting through email):
+Updates for my partner
+Last function fixed, tested, and uploaded to github
+Checking if any last minute items are needed.
+
+What we discussed:
+
+-Issues fixed
+-remaining items that need to be checked off
+----- uploading logs and agile questions document
+----- final testing including the debugged multiplication function.
+
+Part of our conversation for example:
+“Coincidentally, I just uploaded the function to GitHub a few seconds before I saw this email.
+I don't know what the issue was.... I rewrote the same code and it worked for some reason.”
+-----------------------------------------------------------------------------------------------------------------------------
+12/7/2021
+Agile Questions(Meeting through Email):
+Recheck to make sure all code and documents have been integrated and finalized
+Need to email my partner to make sure everything worked out on his end and need to check my documents are all in order and organized.
+Not 100% certain if everything was integrated properly on his end like it was on mine
+
+discussed:
+
+-Testing complete
+-All items completed
+----------------------------------------------------------------------------------------------------------------------------------
+12/8/2021
+
+LAST UPDATE:
+Testing complete and everything is comptaible and is working
diff --git a/Agile_questions_Harris-Toovy.txt b/Agile_questions_Harris-Toovy.txt
new file mode 100644
index 0000000..8852228
--- /dev/null
+++ b/Agile_questions_Harris-Toovy.txt
@@ -0,0 +1,59 @@
+This file contains the agile questions for all meetings I (Jordan Harris-Toovy) took records for (there were a few more not weren't recorded).
+
+11-13-2021:
+1) I will speak with Rayyan (after class) to set the date of the next meeting, suggest work division, and exchange constact information
+2) I know a lot more about how Rayyan responds to email (time-wise) and a bit more project management.
+3) I'm not familar with matrix operations, so I don't know which parts are more or less dificult.
+---OUTCOME: Project was difined and contact info was exchanged
+
+
+11-15-2021:
+1) I will divide the project work, and setup the project GitHub
+2) I know how to setup a GitHub instance
+3) I have not yet learned linear algebra, so I don't know how to accurately judge the dificulty of eact part of the project
+---OUTCOME: Work was divvied up
+
+
+11-20-2021:
+1) I will excange function naming/syntax with Rayyan, and spend any extra time working on the menu function.
+2) I know my own function prototypes, and my own naming scheme
+3) I don't know how Rayyan names his functions.
+---OUTCOME: Clarifying information was exchanged and work was combined
+
+
+It was agreed that the time between these meetings (~11-21 to ~11-26) was to be taken as Thanksgiving break, and so no work was done in this period.
+
+
+11-27-2021:
+1) I will check to see what Rayyan has done so far, and audit the project to figure out what's left.
+2) I know that Rayyan will produce good quality work, and I know that the display function is nearly complete.
+3) I do not know what Rayyan has been up to, nor if he knows the variable type we are using.
+---OUTCOME: Additional clarifying information was exchanged
+
+
+11-29-2021:
+1) I will check in with Rayyan and integrate his code into the GitHub, and add any extra dependencies to the header.
+2) I know that he knows what to work on now, and that he knows the formatting we've decided on.
+3) I do not know what he has done yet, nor if he had any problems that require my assistance.
+---OUTCOME: Work was combined, new schedule was established
+
+
+12-1-2021:
+Emails were excanged to keep track of time expectations.
+---OUTCOME: Unknown
+
+
+12-4-2021:
+1) I will meet with Rayyan to integrate the last of his work into the project.
+2) I know what format he will use for his work, and the needed syntax for working with these functions.
+3) I do not know how much testing and bugfixing he has done on his code.
+---OUTCOME: Work was combined, testing plan was made
+
+
+12-7-2021:
+Emails were excanged to discuss the testing of the code, and fine details were finalized.
+---OUTCOME: Codebase was unified, testing was performed
+
+
+12-8-2021:
+Current date; ongoing collaboration to send in the project via email. \ No newline at end of file
diff --git a/CST116F2021-Proj3.sln b/CST116F2021-Proj3.sln
deleted file mode 100644
index e882c72..0000000
--- a/CST116F2021-Proj3.sln
+++ /dev/null
@@ -1,31 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.31424.327
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CST116F2021-Proj3", "CST116F2021-Proj3\CST116F2021-Proj3.vcxproj", "{1285E6AD-C1B4-4376-81E1-6B8B871B39BF}"
-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
- {1285E6AD-C1B4-4376-81E1-6B8B871B39BF}.Debug|x64.ActiveCfg = Debug|x64
- {1285E6AD-C1B4-4376-81E1-6B8B871B39BF}.Debug|x64.Build.0 = Debug|x64
- {1285E6AD-C1B4-4376-81E1-6B8B871B39BF}.Debug|x86.ActiveCfg = Debug|Win32
- {1285E6AD-C1B4-4376-81E1-6B8B871B39BF}.Debug|x86.Build.0 = Debug|Win32
- {1285E6AD-C1B4-4376-81E1-6B8B871B39BF}.Release|x64.ActiveCfg = Release|x64
- {1285E6AD-C1B4-4376-81E1-6B8B871B39BF}.Release|x64.Build.0 = Release|x64
- {1285E6AD-C1B4-4376-81E1-6B8B871B39BF}.Release|x86.ActiveCfg = Release|Win32
- {1285E6AD-C1B4-4376-81E1-6B8B871B39BF}.Release|x86.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {A9B84DFB-1810-4689-ADE1-DB1D62EFF511}
- EndGlobalSection
-EndGlobal
diff --git a/CST116F2021-Proj3/CST116F2021-Proj3.cpp b/CST116F2021-Proj3/CST116F2021-Proj3.cpp
deleted file mode 100644
index 93999c0..0000000
--- a/CST116F2021-Proj3/CST116F2021-Proj3.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// CST116F2021-Proj3.cpp : This file contains the 'main' function. Program execution begins and ends there.
-//
-
-#include <iostream>
-
-int main()
-{
- std::cout << "Hello World!\n";
-}
-
-// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
-// Debug program: F5 or Debug > Start Debugging menu
-
-// Tips for Getting Started:
-// 1. Use the Solution Explorer window to add/manage files
-// 2. Use the Team Explorer window to connect to source control
-// 3. Use the Output window to see build output and other messages
-// 4. Use the Error List window to view errors
-// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
-// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
diff --git a/CST116F2021-Proj3/CST116F2021-Proj3.vcxproj b/CST116F2021-Proj3/CST116F2021-Proj3.vcxproj
deleted file mode 100644
index e0992e3..0000000
--- a/CST116F2021-Proj3/CST116F2021-Proj3.vcxproj
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" 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>16.0</VCProjectVersion>
- <Keyword>Win32Proj</Keyword>
- <ProjectGuid>{1285e6ad-c1b4-4376-81e1-6b8b871b39bf}</ProjectGuid>
- <RootNamespace>CST116F2021Proj3</RootNamespace>
- <WindowsTargetPlatformVersion>10.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>v142</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</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)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <LinkIncremental>true</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <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)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <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)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <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|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <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>
- <ClCompile Include="CST116F2021-Proj3.cpp" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/CST116F2021-Proj3/CST116F2021-Proj3.vcxproj.filters b/CST116F2021-Proj3/CST116F2021-Proj3.vcxproj.filters
deleted file mode 100644
index b41b4b5..0000000
--- a/CST116F2021-Proj3/CST116F2021-Proj3.vcxproj.filters
+++ /dev/null
@@ -1,22 +0,0 @@
-<?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;c++;cppm;ixx;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;h++;hm;inl;inc;ipp;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>
- <ClCompile Include="CST116F2021-Proj3.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/Flowchart.png b/Flowchart.png
new file mode 100644
index 0000000..860e003
--- /dev/null
+++ b/Flowchart.png
Binary files differ
diff --git a/README.md b/README.md
deleted file mode 100644
index 3c4a451..0000000
--- a/README.md
+++ /dev/null
@@ -1 +0,0 @@
-[![Open in Visual Studio Code](https://classroom.github.com/assets/open-in-vscode-f059dc9a6f8d3a56e377f745f24479a46679e63a5d9fe6f495e02850cd0d8118.svg)](https://classroom.github.com/online_ide?assignment_repo_id=6555282&assignment_repo_type=AssignmentRepo)
diff --git a/Test Plan.txt b/Test Plan.txt
new file mode 100644
index 0000000..8e9a79d
--- /dev/null
+++ b/Test Plan.txt
@@ -0,0 +1,76 @@
+Test set 1 - Menu check
+Test 1-1: Input invalid data into the menus
+
+Test set 2 - Array addition
+Test 2-1: Add the two matrixes:
+
+ 5.69 -13.56 -21.22
+10.76 19.66 17.84
+19.44 -5.05 12.52
+
+and
+
+-20.92 19.92 16.69
+ -2.49 -6.59 11.94
+ 22.03 13.18 18.67
+
+which add to
+
+-15.23 6.36 -4.53
+8.27 13.07 29.78
+41.47 8.13 31.19
+
+Test set 3 - Array multiplication
+Test 3-1: Multiply
+
+ 5.69 -13.56 -21.22
+10.76 19.66 17.84
+19.44 -5.05 12.52
+
+by
+
+-20.92 19.92 16.69
+ -2.49 -6.59 11.94
+ 22.03 13.18 18.67
+
+which equals
+
+-552.747 -76.9744 -463.1177
+118.9626 319.911 747.3976
+-118.2947 585.5379 497.905
+
+Test 3-2: Multiply
+
+-5 -7 5
+ 0 8 -7
+ 8 0 9
+
+ by
+
+-5 10 1
+-4 -7 8
+-5 2 -4
+
+which equals
+
+28 9 -81
+3 -70 92
+-85 98 -28
+
+Test 3-3: Multiply
+
+-5 10 1
+-4 -7 8
+-5 2 -4
+
+by
+
+-5 -7 5
+ 0 8 -7
+ 8 0 9
+
+which equals
+
+33 115 -86
+84 -28 101
+-7 51 -75 \ No newline at end of file
diff --git a/Test Results.txt b/Test Results.txt
new file mode 100644
index 0000000..adc9356
--- /dev/null
+++ b/Test Results.txt
@@ -0,0 +1,295 @@
+See Test Plan.txt for input details.
+
+- - - Test 1-1:
+
+Plase enter the first matrix:
+Input value for ROW 1 and COLOUMN 1: 0
+
+Input value for ROW 1 and COLOUMN 2: 0
+
+Input value for ROW 1 and COLOUMN 3: 0
+
+Input value for ROW 2 and COLOUMN 1: 0
+
+Input value for ROW 2 and COLOUMN 2: 0
+
+Input value for ROW 2 and COLOUMN 3: 0
+
+Input value for ROW 3 and COLOUMN 1: 0
+
+Input value for ROW 3 and COLOUMN 2: 0
+
+Input value for ROW 3 and COLOUMN 3: 0
+
+Plase enter the second matrix:
+Input value for ROW 1 and COLOUMN 1: 0
+
+Input value for ROW 1 and COLOUMN 2: 0
+
+Input value for ROW 1 and COLOUMN 3: 0
+
+Input value for ROW 2 and COLOUMN 1: 0
+
+Input value for ROW 2 and COLOUMN 2: 0
+
+Input value for ROW 2 and COLOUMN 3: 0
+
+Input value for ROW 3 and COLOUMN 1: 0
+
+Input value for ROW 3 and COLOUMN 2: 0
+
+Input value for ROW 3 and COLOUMN 3: 0
+
+Enter desired operation:
+1) Add the first matrix to the second
+2) Multiply the second matrix by the first
+3) Multiply the first matrix by the second
+9
+Invalid entry, enter again:-34
+Invalid entry, enter again:f
+Invalid entry, enter again:
+sd
+Invalid entry, enter again:1
+┌ ┐ ┌ ┐ ┌ ┐
+│ +0.00 +0.00 +0.00│ │ +0.00 +0.00 +0.00│ │ +0.00 +0.00 +0.00│
+│ +0.00 +0.00 +0.00│ + │ +0.00 +0.00 +0.00│ = │ +0.00 +0.00 +0.00│
+│ +0.00 +0.00 +0.00│ │ +0.00 +0.00 +0.00│ │ +0.00 +0.00 +0.00│
+└ ┘ └ ┘ └ ┘
+
+C:\Users\jorda\source\repos\CST116_Project3\x64\Debug\CST116_Project3.exe (process 5820) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+- - -Result: Success; all invalid menu inputs were rejected
+
+
+- - -Test 2-1:
+
+Plase enter the first matrix:
+Input value for ROW 1 and COLOUMN 1: 5.69
+
+Input value for ROW 1 and COLOUMN 2: -13.56
+
+Input value for ROW 1 and COLOUMN 3: -21.22
+
+Input value for ROW 2 and COLOUMN 1: 10.76
+
+Input value for ROW 2 and COLOUMN 2: 19.66
+
+Input value for ROW 2 and COLOUMN 3: 17.94
+
+Input value for ROW 3 and COLOUMN 1: 19.44
+
+Input value for ROW 3 and COLOUMN 2: -5.05
+
+Input value for ROW 3 and COLOUMN 3: 12.52
+
+Plase enter the second matrix:
+Input value for ROW 1 and COLOUMN 1: -20.92
+
+Input value for ROW 1 and COLOUMN 2: 19.92
+
+Input value for ROW 1 and COLOUMN 3: 16.69
+
+Input value for ROW 2 and COLOUMN 1: -2.49
+
+Input value for ROW 2 and COLOUMN 2: -6.59
+
+Input value for ROW 2 and COLOUMN 3: 11.94
+
+Input value for ROW 3 and COLOUMN 1: 22.03
+
+Input value for ROW 3 and COLOUMN 2: 13.18
+
+Input value for ROW 3 and COLOUMN 3: 18.67
+
+Enter desired operation:
+1) Add the first matrix to the second
+2) Multiply the second matrix by the first
+3) Multiply the first matrix by the second
+1
+┌ ┐ ┌ ┐ ┌ ┐
+│ +5.69 -13.56 -21.22│ │ -20.92 +19.92 +16.69│ │ -15.23 +6.36 -4.53│
+│ +10.76 +19.66 +17.94│ + │ -2.49 -6.59 +11.94│ = │ +8.27 +13.07 +29.88│
+│ +19.44 -5.05 +12.52│ │ +22.03 +13.18 +18.67│ │ +41.47 +8.13 +31.19│
+└ ┘ └ ┘ └ ┘
+
+C:\Users\jorda\source\repos\CST116_Project3\x64\Debug\CST116_Project3.exe (process 7412) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+- - -Result: Success; the output array matches the ground truth
+
+
+- - -Test 3-1:
+
+Plase enter the first matrix:
+Input value for ROW 1 and COLOUMN 1: 5.69
+
+Input value for ROW 1 and COLOUMN 2: -13.56
+
+Input value for ROW 1 and COLOUMN 3: -21.22
+
+Input value for ROW 2 and COLOUMN 1: 10.76
+
+Input value for ROW 2 and COLOUMN 2: 19.66
+
+Input value for ROW 2 and COLOUMN 3: 17.84
+
+Input value for ROW 3 and COLOUMN 1: 19.44
+
+Input value for ROW 3 and COLOUMN 2: -5.05
+
+Input value for ROW 3 and COLOUMN 3: 12.52
+
+Plase enter the second matrix:
+Input value for ROW 1 and COLOUMN 1: -20.92
+
+Input value for ROW 1 and COLOUMN 2: 19.92
+
+Input value for ROW 1 and COLOUMN 3: 16.69
+
+Input value for ROW 2 and COLOUMN 1: -2.49
+
+Input value for ROW 2 and COLOUMN 2: -6.59
+
+Input value for ROW 2 and COLOUMN 3: 11.94
+
+Input value for ROW 3 and COLOUMN 1: 22.03
+
+Input value for ROW 3 and COLOUMN 2: 13.18
+
+Input value for ROW 3 and COLOUMN 3: 18.67
+
+Enter desired operation:
+1) Add the first matrix to the second
+2) Multiply the second matrix by the first
+3) Multiply the first matrix by the second
+2
+┌ ┐ ┌ ┐ ┌ ┐
+│ +5.69 -13.56 -21.22│ │ -20.92 +19.92 +16.69│ │ -552.75 -76.97 -463.12│
+│ +10.76 +19.66 +17.84│ X │ -2.49 -6.59 +11.94│ = │ +118.96 +319.91 +747.40│
+│ +19.44 -5.05 +12.52│ │ +22.03 +13.18 +18.67│ │ -118.29 +585.54 +497.91│
+└ ┘ └ ┘ └ ┘
+
+C:\Users\jorda\source\repos\CST116_Project3\x64\Debug\CST116_Project3.exe (process 11448) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+- - -Result: Success; the output array matches the ground truth within rounding error
+
+
+- - -Test 3-2:
+
+Plase enter the first matrix:
+Input value for ROW 1 and COLOUMN 1: -5
+
+Input value for ROW 1 and COLOUMN 2: -7
+
+Input value for ROW 1 and COLOUMN 3: 5
+
+Input value for ROW 2 and COLOUMN 1: 0
+
+Input value for ROW 2 and COLOUMN 2: 8
+
+Input value for ROW 2 and COLOUMN 3: -7
+
+Input value for ROW 3 and COLOUMN 1: 8
+
+Input value for ROW 3 and COLOUMN 2: 0
+
+Input value for ROW 3 and COLOUMN 3: 9
+
+Plase enter the second matrix:
+Input value for ROW 1 and COLOUMN 1: -5
+
+Input value for ROW 1 and COLOUMN 2: 10
+
+Input value for ROW 1 and COLOUMN 3: 1
+
+Input value for ROW 2 and COLOUMN 1: -4
+
+Input value for ROW 2 and COLOUMN 2: -7
+
+Input value for ROW 2 and COLOUMN 3: 8
+
+Input value for ROW 3 and COLOUMN 1: -5
+
+Input value for ROW 3 and COLOUMN 2: 2
+
+Input value for ROW 3 and COLOUMN 3: -4
+
+Enter desired operation:
+1) Add the first matrix to the second
+2) Multiply the second matrix by the first
+3) Multiply the first matrix by the second
+2
+┌ ┐ ┌ ┐ ┌ ┐
+│ -5.00 -7.00 +5.00│ │ -5.00 +10.00 +1.00│ │ +28.00 +9.00 -81.00│
+│ +0.00 +8.00 -7.00│ X │ -4.00 -7.00 +8.00│ = │ +3.00 -70.00 +92.00│
+│ +8.00 +0.00 +9.00│ │ -5.00 +2.00 -4.00│ │ -85.00 +98.00 -28.00│
+└ ┘ └ ┘ └ ┘
+
+C:\Users\jorda\source\repos\CST116_Project3\x64\Debug\CST116_Project3.exe (process 1136) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+- - -Result: Success; the output array matches the ground truth
+
+
+- - -Test 3-3:
+
+Plase enter the first matrix:
+Input value for ROW 1 and COLOUMN 1: -5
+
+Input value for ROW 1 and COLOUMN 2: -7
+
+Input value for ROW 1 and COLOUMN 3: 5
+
+Input value for ROW 2 and COLOUMN 1: 0
+
+Input value for ROW 2 and COLOUMN 2: 8
+
+Input value for ROW 2 and COLOUMN 3: -7
+
+Input value for ROW 3 and COLOUMN 1: 8
+
+Input value for ROW 3 and COLOUMN 2: 0
+
+Input value for ROW 3 and COLOUMN 3: 9
+
+Plase enter the second matrix:
+Input value for ROW 1 and COLOUMN 1: -5
+
+Input value for ROW 1 and COLOUMN 2: 10
+
+Input value for ROW 1 and COLOUMN 3: 1
+
+Input value for ROW 2 and COLOUMN 1: -4
+
+Input value for ROW 2 and COLOUMN 2: -7
+
+Input value for ROW 2 and COLOUMN 3: 8
+
+Input value for ROW 3 and COLOUMN 1: -5
+
+Input value for ROW 3 and COLOUMN 2: 2
+
+Input value for ROW 3 and COLOUMN 3: -4
+
+Enter desired operation:
+1) Add the first matrix to the second
+2) Multiply the second matrix by the first
+3) Multiply the first matrix by the second
+3
+┌ ┐ ┌ ┐ ┌ ┐
+│ -5.00 +10.00 +1.00│ │ -5.00 -7.00 +5.00│ │ +33.00 +115.00 -86.00│
+│ -4.00 -7.00 +8.00│ X │ +0.00 +8.00 -7.00│ = │ +84.00 -28.00 +101.00│
+│ -5.00 +2.00 -4.00│ │ +8.00 +0.00 +9.00│ │ -7.00 +51.00 -75.00│
+└ ┘ └ ┘ └ ┘
+
+C:\Users\jorda\source\repos\CST116_Project3\x64\Debug\CST116_Project3.exe (process 10132) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . .
+
+- - -Result: Success; the output array matches the ground truth
diff --git a/functionsAnsari.cpp b/functionsAnsari.cpp
new file mode 100644
index 0000000..dc3b8e8
--- /dev/null
+++ b/functionsAnsari.cpp
@@ -0,0 +1,62 @@
+//Code by Rayyan Ansari for OIT's CST116-01P project 3, December 2021
+#include "mainHeader.h"
+
+
+void arrayInput(float array1[num][num]) {
+
+
+ for (int i = 0; i < num; i++) {
+
+ for (int x = 0; x < num; x++) {
+
+ float temp;
+
+ cout << "Input value for ROW " << i + 1 << " and COLOUMN " << x + 1 << ": ";
+ cin >> temp;
+ cout << endl;
+ array1[i][x] = temp;
+
+ }
+
+ }
+
+}
+
+void addArrays(float array1[num][num], float array2[num][num], float addedArray[num][num]) {
+
+ for (int i = 0; i < num; i++) {
+
+ for (int x = 0; x < num; x++) {
+
+ addedArray[i][x] = array1[i][x] + array2[i][x];
+
+
+ }
+
+ }
+
+
+
+}
+
+void multiplyArrays(float array1[num][num], float array2[num][num], float addedArray[num][num]) {
+
+
+ for (int i = 0; i < num; i++) {
+
+ for (int z = 0; z < num; z++) {
+
+ for (int x = 0; x < num; x++) {
+
+ addedArray[i][z] += (array1[i][x] * array2[x][z]);
+
+
+ }
+ }
+
+
+ }
+
+
+
+} \ No newline at end of file
diff --git a/functionsHarris-Toovy.cpp b/functionsHarris-Toovy.cpp
new file mode 100644
index 0000000..393dc4e
--- /dev/null
+++ b/functionsHarris-Toovy.cpp
@@ -0,0 +1,100 @@
+//Code by Jordan Harris-Toovy for OIT's CST116-01P project 3, December 2021
+#include "mainHeader.h"
+
+//Gets an input from the user. If it not an int, returns false and sets input to 0
+bool getInt(int& innum)
+{
+ bool valid = true;
+
+ cin >> innum;
+
+ if (!cin.good()) // Check if the input was an int
+ {
+ cin.clear(); //Clear failure condition flag
+ cin.ignore(numeric_limits<streamsize>::max(), '\n'); //Clears until next \n
+
+ valid = false;
+ innum = 0;
+ }
+
+ return valid;
+}
+
+//Returns the amplitude of the largest number in a 3x3 float array
+int findMax(float arr[3][3])
+{
+ int max = 0;
+
+ for (int idx = 0; idx < 3; idx++)
+ {
+ for (int idy = 0; idy < 3; idy++)
+ {
+ if (abs(arr[idx][idy]) > max)
+ {
+ max = ceil(abs(arr[idx][idy]));
+ }
+ }
+ }
+
+ return max;
+}
+
+//Displays three 3x3 float arrays with a char between the fist two and a = between the last two
+void displayTriArray(float arr1[3][3], float arr2[3][3], float arr3[3][3], char sym)
+{
+ int displayWidth = 0, floatWidth = 0, amplitude = 0, magnitude = 1;
+ char pipe = (char)179;
+
+ amplitude = findMax(arr1);
+ if (amplitude < findMax(arr2))
+ {
+ amplitude = findMax(arr2);
+ }
+ if (amplitude < findMax(arr3))
+ {
+ amplitude = findMax(arr3);
+ } //Find the largest number in all arrays
+
+ while ((amplitude /= 10) > 1)
+ {
+ magnitude++;
+ } //Compute the power of the largest number
+
+ floatWidth = magnitude + 5;
+ displayWidth = floatWidth * 3 + 3; //Add extra space to the visual rows if numbers are large
+
+ cout << fixed << showpos << setprecision(2); //Setup number formatting
+
+
+ cout << (char)218 << setw(displayWidth);
+ cout << (char)191 << " " << (char)218 << setw(displayWidth);
+ cout << (char)191 << " " << (char)218 << setw(displayWidth);
+ cout << (char)191 << "\n"; //Top visual row
+
+ cout << pipe << setw(floatWidth) << arr1[0][0] << ' ' << setw(floatWidth) << arr1[0][1] << ' ' << setw(floatWidth) << arr1[0][2] << pipe;
+ cout << " ";
+ cout << pipe << setw(floatWidth) << arr2[0][0] << ' ' << setw(floatWidth) << arr2[0][1] << ' ' << setw(floatWidth) << arr2[0][2] << pipe;
+ cout << " ";
+ cout << pipe << setw(floatWidth) << arr3[0][0] << ' ' << setw(floatWidth) << arr3[0][1] << ' ' << setw(floatWidth) << arr3[0][2] << pipe;
+ cout << "\n"; //Top data row
+
+ cout << pipe << setw(floatWidth) << arr1[1][0] << ' ' << setw(floatWidth) << arr1[1][1] << ' ' << setw(floatWidth) << arr1[1][2] << pipe;
+ cout << ' ' << sym << ' ';
+ cout << pipe << setw(floatWidth) << arr2[1][0] << ' ' << setw(floatWidth) << arr2[1][1] << ' ' << setw(floatWidth) << arr2[1][2] << pipe;
+ cout << " = ";
+ cout << pipe << setw(floatWidth) << arr3[1][0] << ' ' << setw(floatWidth) << arr3[1][1] << ' ' << setw(floatWidth) << arr3[1][2] << pipe;
+ cout << "\n"; //Middle data row
+
+ cout << pipe << setw(floatWidth) << arr1[2][0] << ' ' << setw(floatWidth) << arr1[2][1] << ' ' << setw(floatWidth) << arr1[2][2] << pipe;
+ cout << " ";
+ cout << pipe << setw(floatWidth) << arr2[2][0] << ' ' << setw(floatWidth) << arr2[2][1] << ' ' << setw(floatWidth) << arr2[2][2] << pipe;
+ cout << " ";
+ cout << pipe << setw(floatWidth) << arr3[2][0] << ' ' << setw(floatWidth) << arr3[2][1] << ' ' << setw(floatWidth) << arr3[2][2] << pipe;
+ cout << "\n"; //Bottom data row
+
+ cout << (char)192 << setw(displayWidth);
+ cout << (char)217 << " " << (char)192 << setw(displayWidth);
+ cout << (char)217 << " " << (char)192 << setw(displayWidth);
+ cout << (char)217 << "\n"; //Bottom visual row
+
+} \ No newline at end of file
diff --git a/mainCode.cpp b/mainCode.cpp
new file mode 100644
index 0000000..e2046b8
--- /dev/null
+++ b/mainCode.cpp
@@ -0,0 +1,62 @@
+//Code by Jordan Harris-Toovy ([email protected]) and Rayyan Ansari ([email protected]) for OIT's CST116-01P project 3, December 2021
+
+#include "mainHeader.h"
+
+int main()
+{
+ float arr1[3][3]{ 0.0F }, arr2[3][3]{ 0.0F }, arr3[3][3]{ 0.0F };
+ int menuVal = 0, displayNumberLength = 5;
+ bool validChoice = false;
+
+ cout << "Plase enter the first matrix:" << endl; //Get both arrays from the user
+
+ arrayInput(arr1);
+
+ cout << "Plase enter the second matrix:" << endl;
+
+ arrayInput(arr2);
+
+ cout << "Enter desired operation: \n1) Add the first matrix to the second\n2) Multiply the second matrix by the first"
+ << "\n3) Multiply the first matrix by the second" << endl;
+
+ while (!validChoice) //Get user menu choice and validate it
+ {
+ validChoice = getInt(menuVal);
+
+ if ((menuVal > 3) || (menuVal < 1) || !validChoice)
+ {
+ cout << "Invalid entry, enter again:";
+
+ validChoice = false;
+ }
+ }
+
+ switch (menuVal)
+ {
+ case (1): //Addition of arr1 and arr2 into arr3
+
+ addArrays(arr1, arr2, arr3);
+
+ displayTriArray(arr1, arr2, arr3, '+');
+
+ break;
+
+ case (2): //Multiplication of arr2 by arr1 into arr3
+
+ multiplyArrays(arr1, arr2, arr3);
+
+ displayTriArray(arr1, arr2, arr3, 'X');
+
+ break;
+
+ case (3): //Multiplication of arr1 by arr2 into arr3
+
+ multiplyArrays(arr2, arr1, arr3);
+
+ displayTriArray(arr2, arr1, arr3, 'X');
+
+ break;
+ }
+
+ return (0);
+} \ No newline at end of file
diff --git a/mainHeader.h b/mainHeader.h
new file mode 100644
index 0000000..c5a45fb
--- /dev/null
+++ b/mainHeader.h
@@ -0,0 +1,33 @@
+//Code by Jordan Harris-Toovy and Rayyan Ansari for OIT's CST116-01P project 3, December 2021
+
+#pragma once
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <string>
+#include <sstream>
+#include <limits>
+
+using namespace std;
+
+const int num = 3; //Used to set the array dimensions for flexible functions
+
+//Gets an input from the user. If it not an int, returns false and sets input to 0
+bool getInt(int&);
+
+//Returns the amplitude of the largest number in a 3x3 float array
+int findMax(float[3][3]);
+
+//Displays three 3x3 float arrays with a char between the fist two and an equality sign between the last two
+void displayTriArray(float[3][3], float[3][3], float[3][3], char);
+
+
+//Prompts the user to enter in a new num x num sized float array
+void arrayInput(float array1[num][num]);
+
+//Adds two num x num sized float arrays into a third
+void addArrays(float array1[num][num], float array2[num][num], float addedArray[num][num]);
+
+//Multiplies two arrays into a third
+void multiplyArrays(float array1[num][num], float array2[num][num], float addedArray[num][num]); \ No newline at end of file