Define a class called ‘token number’ that incorporates a token’s number and its location. Number each token object as it is created. Use two variables of the angle class to represent the token’s latitude and longitude. A member function of the token class should get a position from the user and store it in the object; another should report the serial number and position. Design a main() program that creates three token, asks the user to input the position of each, and then displays each token’s number and position.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

Define a class called ‘token number’ that incorporates a token’s number and its location. Number each token object as it is created. Use two variables of the angle class to represent the token’s latitude and longitude. A member function of the token class should get a position from the user and store it in the object; another should report the serial number and position. Design a main() program that creates three token, asks the user to input the position of each, and then displays each token’s number and position.

Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning