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.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education