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,...
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...
Create a stadium class. The class header file content (.h file) can go in this question,...
Create a stadium class. The class header file content (.h file) can go in this question, the class implementation (.cpp file) can go in the following question, and the main.cpp content can go in the third question. static data members: starting seat number next seat number data members: stadium name name of home team current opponent seats sold (vector of seat numbers) member functions: custom constructor - take input of stadium name default constructor get next seat number (static) change...
We encourage you to work in pairs for this challenge to create a Student class with...
We encourage you to work in pairs for this challenge to create a Student class with constructors. First, brainstorm in pairs to do the Object-Oriented Design for a Student class. What data should we store about Students? Come up with at least 4 different instance variables. What are the data types for the instance variables? Write a Student class below that has your 4 instance variables and write at least 3 different constructors: one that has no parameters and initializes...
For this question you will write two (2) constructors in the implementation file: CylinderType.cpp (Assume that...
For this question you will write two (2) constructors in the implementation file: CylinderType.cpp (Assume that the base class CircleType has a default constructor & assigns 1.0 to its private double radius) part (a) // The first constructor is a default constructor. Please use height as the CylinderType's private member name in the body. // It will create a CylinderType object with a radius of 1.0 and height of 1.0 part (b)    // The second constructor should have two...
You need to write a permute class that will take first and second strings to rearrange...
You need to write a permute class that will take first and second strings to rearrange letters in first, followed by second. For example, if the first is “CAT” string and second is “MAN” string, then the program would print the strings TACMAN, ATCMAN, CTAMAN, TCAMAN, ACTMAN, and CATMAN. The first and second strings can be any length of string or a null. The permute class uses a Node class as link list node to link all letters arrangement. The...
C++ Do not use constructors Create a class named Coord in C++ Class has 3 private...
C++ Do not use constructors Create a class named Coord in C++ Class has 3 private data items               int xCoord;               int yCoord;               int zCoord; write the setters and getters. They should be inline functions               void setXCoord(int)             void setYCoord(int)            void setZCoord(int)               int getXCoord()                     int getYCoord()                   int getZCoord() write a member function named void display() that displays the data items in the following format      blank line      xCoord is                          ????????      yCoord is                          ????????...
Has to be written in C#! Write a program that includes an Employee class that can...
Has to be written in C#! Write a program that includes an Employee class that can be used to calculate and print the take-home pay for a commissioned sales employee. Items to include as data members are employee number, first name, last name, and total sales. All employees receive 9% of the total sales of the month. Federal tax rate is 18%. Retirement contribution is 10%. Social Security tax rate is 6%. Use appropriate constants, design an object-oriented solution, and...
Write a Java class called CityDistances in a class file called CityDistances.java.    2. Your methods...
Write a Java class called CityDistances in a class file called CityDistances.java.    2. Your methods will make use of two text files. a. The first text file contains the names of cities. However, the first line of the file is a number specifying how many city names are contained within the file. For example, 5 Dallas Houston Austin Nacogdoches El Paso b. The second text file contains the distances between the cities in the file described above. This file...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT