Question: Please do in java. I will provide my code if I can :) package demo; public class Epay { private int id; private String userName;

Please do in java. I will provide my code if I can :) Please do in java. I will provide my code if I can

:) package demo; public class Epay { private int id; private String

userName; private String emailId; private double walletBalance; //constructor to initialize variable public

user(int id, String userName, String emailId, double walletBalance) { this.id = id;

package demo;

public class Epay { private int id; private String userName; private String emailId; private double walletBalance; //constructor to initialize variable public user(int id, String userName, String emailId, double walletBalance) { this.id = id; this.userName = userName; this.emailId = emailId; this.walletBalance = walletBalance; } //method to make payment public boolean makePayment() { if(billAmount > 0) { System.out.println("Please make payment!"); } else { System.out.println("Insufficient funds!");

} public int getId() { return Id; } public void setId(int id) { this.id = Id; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getEmailId() { return emailId(); } public void setEmailId(String emailId) { return emailId; } public double getWalletBalance{ return walletBalance; } public void setWalletBalance(double walletBalance) { return walletBalance; } class PremiumUser{ private int rewardPoints; //constructor to initialize variables public PremiumUser(int id, String userName, String emailId, double walletBalance) { public boolean makePayment() { if(double billAmount > 0) System.out.println("Reward points will be added to your bill!"); }else { System.out.println("Insufficient funds!"); } this.RewardPOints = rewardPoints; } public int getRewardPoints() { return rewardPoints; } public void setRewardPoints() { return RewardPoints; } public class Main{ public static void main(String args[]) { Epay e = new Epay(101, "Jack123", "jrob@email.com", 66.99); PremiumUser p = new PremiumUser(23+6.70); //call make Payment() method System.out.println("The Wallet Balance is: " + walletBalance()); System.out.println(); Sytem.out.println("Epay info: " + e.print() + "The Reward Points for this user is: " + p.print); } }

EPay Wallet is a wallet application using which users can pay various bills. Users can make payments only if they have enough wallet balance. There are two kinds of users - User and PremiumUser. PremiumUser gets reward points for every payment. Implement the classes based on the class diagram and description given below. User

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!