Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming Languages 12th International Symposium Dbpl 2009 Lyon France August 2009 Proceedings Lncs 5708

Authors: Philippa Gardner ,Floris Geerts

2009th Edition

3642037925, 978-3642037924

More Books

Students also viewed these Databases questions

Question

3. What strategies might you use?

Answered: 1 week ago

Question

3. Write a policy statement to address these issues.

Answered: 1 week ago