Question: Needs help with the class specification. The vect.h file CIS 125 C++ Programming Mod 7 Assignment This program will be due in 2-1/2 parts. The

Needs help with the class specification. The vect.h file
 Needs help with the class specification. The vect.h file CIS 125

CIS 125 C++ Programming Mod 7 Assignment This program will be due in 2-1/2 parts. The first part will be (vect.h) file (this is the half part.) Next we will begin by testing out the vector class much like you with the Inventory class. We will then "use" our fully functioning vector class in a program. be announced creating your interface to the Vector class Due dates to Purpose: To gain more understand of classes by creating a robust class using overloaded constructors, overloaded operators that can be used with multiple programs. For this assignment you will be writing a class and two "driver" programs that will use the class. The first "driver" program will test (ALL of) the features of the class. The second program will run a little simulation program (The dizzy kid, random walk) Write a Vector Class. A Vector is a term used in engineering and physics and is a quantity that has both Magnitude and direction. We can represent the Vectors in rectangular components (x and y values) or polar components magnitude (length) and direction (angle). Interface: . Your class specification will be stored in the vect.h file Your Vector class should have at least 2 constructors A default one that sets all data members to zero and sets the mode to rectangular. One that takes 2 arguments to set the x and y values (they should be floating point numbers) (Extra Credit) Add another constructor that takes both polar and rectangular components. It will need a 3d argument to determine which "mode " you want to use. Also it could work if you only pass it the first 2 arguments, the third one should be defaulted to the rectangular mode Although you may not need it, create the destructor. Your code can be a just a "placeholder" and add code later (if we determine that we need it.) o o o o . Mutators o You should be able to set the "mode" to polar or rectangular. This will be primarily used to alter your output of you display and stream insertion operator (<. you can use a single function will take an argument or separate functions for this. create setrect that rectangular components and y values o credit ser either component polar magnitude based on third flag. character flag we only need one bit but char is ok this . accessors: accessors be able to report x angle of vector should display in rectangle mode example:03 ir function. the set by d it important not have stale data. direction degrees example:> nutalo function, show the components of vector in either rectangular or polar components. Y should overload the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!