(10 pts) 1. Give a c+statements to create a variable named fibonacci to hold a dynamic array of ints. Cin a value for N, and

(10 pts) 1. Give a c+statements to create a variable named fibonacci to hold a dynamic array of ints. Cin a value for N, and a. set the size of Fibonacci to n Add the first N values to your Fibonacci array b. c. What makes the fibonacci recursive solution so simple? Is it an efficient solution, why or why not? 5. (5pts) What does a copy constructor do, and why would we need to use one? 6. (5 pts) What is the correct process for copying an object with pointers. 9. (10 pts) Given a 2 dimensional array of integers nums , which holds up to MAX rows and MAX columns. Write the function sumCenter (nums, MAX) which returns the sum of the values not on the outside edge. Example 1 2 3 4 then sumCenter (nums, MAX) returns 5 68 9 5 6 7 If nums S9 10 111213 14 7 11. (20 pts) Write a class Employee that accepts constructor. Add set functions for Name and Salary and get functions for each private data member. Add a getMonthlySalary function and getWeeklySalary function int for IDNumber, String for Name and double for AnnualSalary in the an 12. (5 pts) Write a recursive function PrintStringBackwards( string toReverse) that outputs toReverse backwards 13. (5 pts) Write an iterative function PrintStringBackwards( string toReverse) that outputs toReverse backwards



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *