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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started