Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ help please! much appreciated! need a .cpp and .hpp file that can successfully run through these tests, thank you very much! printed below to

c++ help please! much appreciated! need a .cpp and .hpp file that can successfully run through these tests, thank you very much! printed below to be able to copy/paste into a compiler

#include "catch/catch.hpp" #include "../matrix3d.hpp"

TEST_CASE ("Default Matrix") { Matrix3D m; CHECK(0 == m.GetValue(0, 0)); }

TEST_CASE ("Specified Matrix") { /* 1 0 2 1 2 0 1 0 0 */

Matrix3D m(1,0,2, 1,2,0, 1,0,0); CHECK(1 == m.GetValue(0, 0)); CHECK(2 == m.GetValue(0, 2)); }

TEST_CASE ("Determinant for default matrix") { Matrix3D m; CHECK(0 == m.Determinant()); }

TEST_CASE ("Determinant for specified matrix") { Matrix3D m(1,0,2, 1,2,0, 1,0,0); // https://www.wolframalpha.com/input/?i=%7B%7B1%2C0%2C2%7D%2C%7B1%2C2%2C0%7D%2C%7B1%2C0%2C0%7D%7D CHECK(-4 == m.Determinant());

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions

Question

What is digital literacy? Why is it necessary?

Answered: 1 week ago