Question
I'm new learning Java and need help with how to code the following in Eclipse. Please leave comments with code to help me understand. I
I'm new learning Java and need help with how to code the following in Eclipse. Please leave comments with code to help me understand. I don't know if arrays are needed but please avoid them, we have not learned them yet. I need to:
Create a Business class:
Instance variables: Student id -----------1000 - 9999 (range check) Student name ---------- Present (must have an entry) Student email address ------------------Present (must have an entry) Number of hours ----------- 2.5 - 18 (range checking)
Two constructors should be coded, one that accepts no arguments and sets every field to its default value, and one that accepts all four fields, and assigns the passed values into the instance variables. For each instance variable create two methods; a getter and a setter.
Add a static method to the class that will accept the number of hours. Multiply the number of hours by 60.50; then return the result back to the presentation class.
Create a Presentation class: The presentation class will ask the user to input information into the four fields listed above. That information will be passed over to the business class using the individual set methods. This class with be divided into methods and tested for valid data. Your presentation class will display all the values from the four fields listed above returned from the business class; along with the amount calculated from the static method.
Thanks for the help!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started