abstract class computer science lab work


Consider the following abstract class:
class NumberSeq {
 virtual int find(int k)=0;
 void printSeq(int k, int l); // print the number from index k to index l
Write the implementation of printSeq() at the base class only as well as the OddSeq and EvenSeq derived classes that implement find() method, which returns the kth odd or even number, respectively, depending on the derived class being used.
• Even numbers: 2*k, where k is the index of the kth even number
• Odd numbers: 2*k-1, where k is the index of the kth odd number

Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.