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 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

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

In Exercises 1558, find each product. (x + 1)(x 2 - x + 1)

Answered: 1 week ago

Question

=+ 9. What is inflation and what causes it?

Answered: 1 week ago

Question

=+6. What does the invisible hand of the marketplace do?

Answered: 1 week ago