give me some class & objects examples?
Answer / divyaja
Sometimes, a programmer will want to
define a custom "thing" and the operations
that can be performed on that "thing"
• A class is the definition
• An object is a particular instance of a class
• Classes contain
– data, called members
– functions, called methods
Is This Answer Correct ? | 7 Yes | 0 No |
A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a saleperson who sells $5000 worth of merchandise in a week receives $200 plus 9 percent of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value A 239.99 B 129.75 C 99.95 D 350.89 Write a program that inputs one salesperson's items sold in a week (how many of item A? of item B? etc.) and calculates and displays that salesperson's earnings for that week.
What is a buffer c++?
What are the advantages of using pointers in a program?
What is meant by reference variable in C++?
Explain stack & heap objects?
What is difference between malloc()/free() and new/delete?
What is low level language in simple words?
What are the characteristics of friend functions?
What is encapsulation in c++?
How do I tokenize a string in c++?
Explain Text Manipulation Routines?
What is the basic structure of c++ program?