Determine the value of such that the matrix is the augmented matrix of a consist
ID: 3082358 • Letter: D
Question
Determine the value of such that the matrix is the augmented matrix of a consistent linear system |3 -6 | h |-9 18 | 8Explanation / Answer
Here is header file Time.h: class Time { public: Time(); //Postcondition: class object is constructed //Time object is 0 mins, 0 secs Time(int initMins, int initSecs); //Precondtion: passed in numbers >= 0. if initSecs > 59, //increments the minutes in the object. //Negative values are set to 0 //Postcondition: constructed object has passed in parameters int returnMins() const; //Precondition: Time objects has been constructed //Postcondition: Time client recieves the minutes part //of the Time object that was already created. int returnSecs() const; //Precondition: Time object has been constructed //Postcondition: client recieves the seconds of //the existing Time object. int returnTotalTime() const; //Precondtion: Time object has been constructed //Postcondition: Time client gets total time in seconds bool Equal(Time SecondTime) const; //Precondition: Two existing Time objects //Postcondition: Client recieves boolean value //stating true or not bool GreaterThan(Time SecondTime) const; //Precondition: Two existing Time objects //Postcondition: Client receives boolean value stating //whether calling Time object is larger than SecondTime or not bool LessThan(Time SecondTime) const; //Precondtion: Two exiting Time objects //Postcondition: Client recieves boolean value stating whether //calling Time object is less than SecondTime or not Time AddTime(Time SecondTime); //Precondition: Two existing Time objects //Postcondition: New Time object is returned to Time client //Client can read mins and secs of new object using public methods //New object adds Time mins and secs and SecondTime mins and secs Time SubtractTime(Time SecondTime); //Precondition: Two existing Time objects //Postcondition: New time object is returned to Time client //Client can read mins and secs of new object using public methods //New object subtracts Time mins and secs from SecondTime mins and secs //If result of calculation either together or separate is less than //0 set the object to 0 mins, 00 secs. private: int mins; int secs; }; The implementation file ImplFileTimeClassAsgnt.cpp: #include "Time.h" #include using namespace std; Time::Time() { mins = 0; secs = 0; } Time::Time(int initMins, int initSecs) { mins = initMins; secs = initSecs; if(secs > 59) { mins++; secs -= 60; } if(initMins < 0) mins = 0; if(initSecs < 0) secs = 0; } int Time::returnMins() const { return mins; } int Time::returnSecs() const { return secs; } int Time::returnTotalTime() const { return((60 * mins) + secs); } bool Time::Equal(Time SecondTime) const { if((SecondTime.returnTotalTime()) != (returnTotalTime())) //Time objects do not equal one another return false; else return true; } bool Time::GreaterThan(Time SecondTime) const { if((returnTotalTime()) > (SecondTime.returnTotalTime())) return true; //First time greater than second time else return false; //First time is not greater than second time } bool Time::LessThan(Time SecondTime) const { if((returnTotalTime()) < (SecondTime.returnTotalTime())) return true; //First time is less than second time else return false; //First time is not less than second time } Time Time::AddTime(Time SecondTime) { int NewMins; int NewSecs; NewMins = mins + SecondTime.mins; NewSecs = secs + SecondTime.secs; Time NewAddTime(NewMins, NewSecs); return NewAddTime; //Returns a new class instance } Time Time::SubtractTime(Time SecondTime) { int NewMins; int NewSecs; NewMins = mins - SecondTime.mins; if(NewMins < 0) NewMins = 0; NewSecs = secs - SecondTime.secs; if(NewSecs < 0) NewSecs = 0; Time NewSubtractTime(NewMins, NewSecs); return NewSubtractTime; //Returns a new class instance } (Code block isn't putting the whole thing on there so couldn't use it for this one or driver file.) Driver File: #include "Time.h" #include using namespace std; int main() { Time Time1; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.