Question: Purpose: To learn how to code multiple methods and have the main() call these methods within the same application program. Dividing the work a program

 Purpose: To learn how to code multiple methods and have the

main() call these methods within the same application program. Dividing the work

Purpose: To learn how to code multiple methods and have the main() call these methods within the same application program. Dividing the work a program has to complete into methods makes the program more efficient, easier to maintain, and debug. The code within a method should support a task or function. These methods will all be parameterless (empty parentheses) and void (return nothing) Prep Work: Read chapter 5 and your instructor's PowerPoint slides. Refer in particular to slide 5 on how to code the methods headers and slide 10 on how to code class-level variables (fields) that can be accessed by all the methods in a class. Lab Exercise 5.1 Instructions: Use the Dental program you created for LE 1.2. Rename the program to DentalYourLastNameFirstinitialLE51 java. In the program create 4 additional methods. The main) will call these methods in the order listed. Name and code the methods as follows: 1. setGroupPolicyNo(): This method prompts the user for the dental group policy number 2. setNolnsured): This method prompts for the number of people to be insured. 3. calcDentalCost(): This method calculates the total cost of the dental policy assuming an average cost of $40.00 per person with a 5% discount if the number insured is 1000 or more. 4. displayPolicylnfo(): This method prints the group policy number, the total number insured, and the total cost of the dental coverage for Wayne's Body Shop 5. Refer to attached sample output. Grading Requirements: During lab class, enter your name on the sign-up sheet for grading when your assignment is in gradable condition. Files Posted with Instructions LE 5.1 SAMPLE OUTPUT pdf o Test your program using all the data and scenarios in the sample output

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!