Question

Write a C++ header (.h) file to specify a class GiftCard, with at least 3 meaningful...

Write a C++ header (.h) file to specify a class GiftCard, with at least 3 meaningful private data members and 3 public methods, including two constructors. At least one numeric data member and one calculator method to make this class meaningful / useful.

Homework Answers

Answer #1
class GiftCard{
        private:
                int amount;
                string from;
                string message;
        public:
                GiftCard();
                GiftCard(int a,string f,string m);
                void amount(int am);
                string geMessage();
                int getAmount();
}

NOTE : PLEASE COMMENT BELOW IF YOU HAVE CONCERNS.

I AM HERE TO HELP YOUIF YOU LIKE MY ANSWER PLEASE RATE AND HELP ME IT IS VERY IMP FOR ME

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Design a class with the following requirements: 1- give the class a name from your choice....
Design a class with the following requirements: 1- give the class a name from your choice. 2- write some code that creates three instance variables, choose a name and type for each one of them. (must have two private and one public variables) 3- Initialize the variables using two different constructors. 4- Use mutator and accessor methods (set and get) for the private data members. 5- Display the value of each member variable using a method. 6- In the main,...
Please write a class "template" AVLTree in C++. The class must be placed in a single...
Please write a class "template" AVLTree in C++. The class must be placed in a single header file called AVLTree.h The class must contain the following public member functions: -       necessary constructors for your implementation -       destructor -       isEmpty () – determines if the tree is empty - returns 1 if it is empty; 0 otherwise -       height () – returns the height of the node or -1 if a nullptr -       insert () – inserts data into the tree – must abide by AVL...
1.Write a c++ program to find Maximum out of two numbers using friend function. Here one...
1.Write a c++ program to find Maximum out of two numbers using friend function. Here one member is of one class and second belongs to another class. 2.Write a c++ program to swap the values of private data members of classes names classOne and classTwo using friend keyword.
write a c++ program A class called car (as shown in the class diagram) contains: o...
write a c++ program A class called car (as shown in the class diagram) contains: o Four private variables: carId (int), carType (String), carSpeed (int) and numOfCars (int). numOfCars is a static counter that should be  Incremented whenever a new Car object is created.  Decremented whenever a Car object is destructed. o Two constructors (parametrized and copy constructor) and one destructor. o Getters and setters for the Car type, ID, and speed. And static getter function for numOfCars....
JAVA QUIZ Question 1 Which of the following is false about a "super" call in a...
JAVA QUIZ Question 1 Which of the following is false about a "super" call in a sub class's constructor? Select one: a. It must be the first statement in the constructor b. If you don't include it Java will c. If you don't include it you must have a 0 parameter constructor coded in the super class or no constructors coded at all in the super class d. The sub class constructor containing the super call and the called super...
Lab Objectives This lab was designed to inforce the following programming concepts: • Using classes to...
Lab Objectives This lab was designed to inforce the following programming concepts: • Using classes to create a data type SimpleCalculator capable of performing arithmetic operations. • Creating const member functions to enforce the principle of least privilege. The follow-up questions and activities also will give you practice: • Using constructors to specify initial values for data members of a programmer-defined class. Description of the Problem Write a SimpleCalculator class that has public methods for adding, subtracting, multiplying and dividing...
ALL CODE MUST BE IN C++ Before you begin, you must write yourself a LinkedList class...
ALL CODE MUST BE IN C++ Before you begin, you must write yourself a LinkedList class and a Node class (please name your classes exactly ​as I did here). Please follow the below specifications for the two classes. Node.cpp ● This must be a generic class. ● Should contain a generic member variable that holds the nodes value. ● Should contain a next and prev Node* as denoted here. ● All member variables should be private. ● Use public and...
In C++ Employee Class Write a class named Employee (see definition below), create an array of...
In C++ Employee Class Write a class named Employee (see definition below), create an array of Employee objects, and process the array using three functions. In main create an array of 100 Employee objects using the default constructor. The program will repeatedly execute four menu items selected by the user, in main: 1) in a function, store in the array of Employee objects the user-entered data shown below (but program to allow an unknown number of objects to be stored,...
Use Java To(with Explaination of Steps Please): You’re given a class Employee that represents a worker...
Use Java To(with Explaination of Steps Please): You’re given a class Employee that represents a worker in some unknown industry.Each employee has a name , balance and an hourly rate that is unique to them. So Worker1 can have a rate of $5 per hour and Worker2 can have $8 per hour. There are 2 constructors – one that lets you specify the name, a starting balance and the rate,and another that only lets you specify the name and rate...
You should make up a transaction file with at least 3 records of students. Write a...
You should make up a transaction file with at least 3 records of students. Write a main program that creates a collection of students. Your transaction file contains a set of information about students. Your program should contain four classes: StudentProfile, Person, Student, and Course. StudentCollection has the following attributes:             vector<StudentProfile>           StCollection; StudentProfile class has the following attributes: Person                         PersonalInfo Student            StdInfo Person class has the following attributes: long                 SSN string               Fname string              ...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT