Files that you must write and turn in: 1. sequence1.h: The header file for the sequence class. Actually, you don't have

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Files that you must write and turn in: 1. sequence1.h: The header file for the sequence class. Actually, you don't have

Post by answerhappygod »

Files That You Must Write And Turn In 1 Sequence1 H The Header File For The Sequence Class Actually You Don T Have 1
Files That You Must Write And Turn In 1 Sequence1 H The Header File For The Sequence Class Actually You Don T Have 1 (29.17 KiB) Viewed 52 times
Files That You Must Write And Turn In 1 Sequence1 H The Header File For The Sequence Class Actually You Don T Have 2
Files That You Must Write And Turn In 1 Sequence1 H The Header File For The Sequence Class Actually You Don T Have 2 (60.4 KiB) Viewed 52 times
Files that you must write and turn in: 1. sequence1.h: The header file for the sequence class. Actually, you don't have to write much of this file. Just start with HW2 file.txt and add your name and other information at the top. Also, decide on appropriate private member variables, an declare these in the sequence class definition at the bottom o the header file If some of your member functions are implemented as inline functions, then you may put those implementations in this file too. 2. sequence1.cxx: The implementation file for this first sequence class. You will write all of this file, which will have the implementations of all the sequence's member functions. Other files that you may find helpful: 1. HW2 file 1.txt A simple interactive test program. 2. HW2 file 2.txt A non-interactive test program that will be used to grade the correctness of your sequence class.
The sequence Class Using a Fixed-Sized Array Discussion of the Assignment Many of the features of this class are similar to the bag class from Section 3.1, so start by thoroughly reading Section 3.1 and pay attention to new features such as static constant members and the use of a typedef. The sequence class itself is discussed in Section 3.2 of the class text. Notice how the sequence differs from a bag (see page 119). The interactive test program HW2 file 3.txt is discussed in Section 3.3 of the class text. Start by declaring the sequence's private member variables in sequence.h. Then write the invariant of your ADT at the top of sequence1.cxx. The invariant describes precisely how all of your private member variables are used. All of the member functions (except for the constructor) may count on the invariant being true when the member function is activated. And all of the member functions are responsible for ensuring that the invariant is true when the function returns. As always, do your work in small pieces. For example, my first version of the sequence had only a constructor, start, insert, advance, and current. My other member functions started out as stubs. Use the interactive test program and a debugger to track down errors in your implementation. If you have an error, do not start making changes until you have identified the cause of the error. The ability to initialize and use a static member constant within the class definition is a relatively new feature. If you have an older compiler that does not support static const members, then you may use enum (CAPACITY = 30); instead of static const size_type CAPACITY= 30; After this definition, the name bag::CAPACITY is defined to have the integer value 30. Although this is not the intended use of an enum definition, the result is the same as using a static member constant (see more discussions at page 99 in the textbook).
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply