
QUESTION AND COLLEGE COMPILER OUTPUT ATTACHED IN IMAGE . PLEASE SEE
AND MY SOLUTION TO THE PROBLEM IS GIVEN BELOW.
------------MY SOLUTION----------
MAIN.CPP
#include <iostream> #include "HPVISACard.cpp" using namespace std; int main() { // ask user to enter his choice // ask user to enter transaction amount // ask user to enter reward points // print card details by calling suitable methods // ask user to enter amount // create a object of class HPVISACard // print card details by calling suitable methods |
HPVISCACard.cpp
#include <iostream> class HPVISACard :public VISACard{ // if type == Fueal // else calculate 3% of amount // finally print Reward Points // calling super class constructor |
viscard.cpp
#include <iostream> class VISACard { // private members of class // public members of class // finally print reward points public: // constructor with 2 params // setters // getters |
YOU HAVE TO FIND WHY THE OUTPUT IS NOT MATCHING AND MODIFY MY CODE ACCORDING TO THAT.



Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 10 images

- Define pointer data type.arrow_forwardCourse : Compiler Construction Book Name : Compilers Principles Techniques and Tools Second Edition by alfred V.aho monica s.lam Ravi sethi Jeffrey D.Ullman Please solve from the book (Pg#378) Exercise 6.3.1 : Determine the types and relative addresses for the identifiers in the following sequence of declarations: float x; record { float x; float y; } p; record { int tag; float x; float y; } q;arrow_forwardPlease explain this C++ program, it doesn't have to be long as long as you explain the important parts of the code do. You can explain it line by line and I will give you a good rating. Thank you Activity name: Trinode Restructuring #include "node.h"#include <iostream>using namespace std;class BSTree { node* root; int size; node* create_node(int num, node* parent) { node* n = (node*) malloc( sizeof(node) ); n->element = num; n->parent = parent; n->right = NULL; n->left = NULL; return n; } bool search(node* curr, int num) { if (curr == NULL) { return false; } if (num == curr->element) { return true; } if (num < curr->element) { return search(curr->left, num); } return search(curr->right, num); } node* search_node(node* curr, int num) { if (num == curr->element) { return curr;…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





