007-003-006
Class Usage: Point Card
Easy
Problem Description
class Usage: Point Card
In this problem, you will create a program that defines a PointCard class with an initial point value, calls a method to add points, and displays the point total before and after the addition to standard output.
Learning Objective: Manage state using class
Create program using point card class to check and add points. Call class methods to accumulate points.
Input
Line 1: Initial points (integer)
Line 2: Add points (integer)
Output
Current: [points]pt
After adding: [points]pt
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up