Program 4 - Student account Code the following program in Java. Only submit the source files. There will be two source files. Do not zip your project as it increases the marking time significantly. As a programmer you must be able to follow precise instructions. You will also not always get precise instructions. You must learn to ask questions and make valid deductions of what is expected. StudentAccount -studentName: String -studentCourse: String -balance: double +StudentAccount() +StudentAccount(String, String, double) +getters() +setters() +toString(): String +pay(double): double +addFees(double): double +refund(): void Code the StudentAccount class according to the class diagram Methods explanation: pay(double): double This method is called when a student pays an amount towards outstanding fees. The balance is reduced by the amount received. The updated balance is returned by the method. addFees(double): double This method is called to increase the balance by the amount received as a parameter. The updated balance is returned by the method. refund(): void This method is called when any monies owned to the student is paid out. This method can only refund a student if the balance is negative. It displays the amount to be refunded and set the balance to zero. (Use Math.abs(double) in your output message). If there is no refund, display an appropriate message. Test your StudentAccount class by creating objects and calling the methods addFees(), pay() an refund(). Use toString() to display the object's data after each method called.
Program 4 - Student account Code the following program in Java. Only submit the source files. There will be two source files. Do not zip your project as it increases the marking time significantly. As a programmer you must be able to follow precise instructions. You will also not always get precise instructions. You must learn to ask questions and make valid deductions of what is expected. StudentAccount -studentName: String -studentCourse: String -balance: double +StudentAccount() +StudentAccount(String, String, double) +getters() +setters() +toString(): String +pay(double): double +addFees(double): double +refund(): void Code the StudentAccount class according to the class diagram Methods explanation: pay(double): double This method is called when a student pays an amount towards outstanding fees. The balance is reduced by the amount received. The updated balance is returned by the method. addFees(double): double This method is called to increase the balance by the amount received as a parameter. The updated balance is returned by the method. refund(): void This method is called when any monies owned to the student is paid out. This method can only refund a student if the balance is negative. It displays the amount to be refunded and set the balance to zero. (Use Math.abs(double) in your output message). If there is no refund, display an appropriate message. Test your StudentAccount class by creating objects and calling the methods addFees(), pay() an refund(). Use toString() to display the object's data after each method called.
Chapter16: Graphics
Section: Chapter Questions
Problem 1DE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 5 images
Knowledge Booster
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.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT