Question: I need assistance with this java assignment. the concept 'Method Overloading' undefined Create a class Customer with below attributes: int - id String name String

I need assistance with this java assignment.

the concept 'Method Overloading'

I need assistance with this java assignment. the concept 'Method Overloading' undefinedundefined

Create a class Customer with below attributes: int - id String name String dob double - salary String email int - age Make all the attributes private.Create corresponding getters and setters. Create a constructor which takes all parameters in the above sequence. The constructor should set the value of attributes to parameter values inside the constructor. Create a method add(double salary) - adds given input value to salary attribute Create a method add(double salary, int age)- adds given input value to salary, age attributes respectively. The return type of the above methods should be void. Create a main method and test the above methods. Refer below sample main method and test the output: public class Customer Demo { public static void main(String args[]) { Customer customer= new Customer(30, "zpaaixg","aifaqvi",285.0,"gzjwpkm", 27); customer.add(608.0); System.out.println(customer.getSalary(); customer.add(425.0,98); System.out.println(customer.getSalary()); System.out.println(customer.getAge()); Output 893.0 1318.0 125

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!