Question: JAVA Design a class to represent a credit card. Think about the attributes of a credit card; that is, what data is on the card?
JAVA
Design a class to represent a credit card. Think about the attributes of a credit card; that is, what data is on the card? What behaviors might be reasonable for a credit card?
Repeat Exercise for a coin instead of a credit card.
I want then give three examples of instances of this class.

Is the code used
package Exercises3;
public class Coin {
private int coinValue; private String country;
public void getValue(){ System.out.println("value of the coin "+coinValue); } }
enumeration>> coin 1 Country:lndia enumeration>> coin2 CoinValue:2 Country Australia enumeration>> coin3 CoinValue:20 Country:lndia
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
