Question: Computer Science Objectives: Employ the object technology provided by C++ to embed a functional (or imperative) program into a method of a class, and then

Computer Science Objectives: Employ the object technology provided by C++ to embed a functional (or imperative) program into a method of a class, and then invoke that method to execute the program. The lab assignment for this week is to convert an imperative (not having classes and objects) program into an object-oriented program. This is done by writing the original program as the run() method of a class, and write small main program that creates an object of that class, and invokes the run() method on that object.

Question 1. What will be placed in the .h and .cpp files? What will the main program contain? Question 2. Implement the C++ program with 3 files: the header file, the body of the class, and the main program. What to submit. Upload Script showing all the code files (.h, .cpp and the main), compila- tion of the class, compilation of main, and tests.

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 Programming Questions!