Question
in java
need to review
20) (1 point) Write the constructor for the class Customer, which has the name and the ID of the Customer and a reference to
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer

public Customer(String name, String ID, Account account) {
    this.name = name;
    this.ID = ID;
    this.account = account;
}
Add a comment
Know the answer?
Add Answer to:
in java need to review 20) (1 point) Write the constructor for the class Customer, which...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Java - Object Oriented Programming Declare a class named Customer that has two private fields? Write...

    Java - Object Oriented Programming Declare a class named Customer that has two private fields? Write a set method to make sure that if age > 125 years or less than 0 then it is set to 0 (default value) What does it indicate when declaring a class's instance variables with private access modifier? What is the role of a constructor? The data part of by an object's instance variables is known as? Do all methods have to always return...

  • need code for this in java Design a set of classes that work together to simulate the Stock Transaction System. You should design the following classes: 1. the StockMarket class. This class si...

    need code for this in java Design a set of classes that work together to simulate the Stock Transaction System. You should design the following classes: 1. the StockMarket class. This class simulates the stock market such as Nasdaq, NYSD, or other stock market. The class's responsibility are as follows: -To know the stock market abbreviation, full name, location, an arraylist of stocks for this market 2. the Company class: this class simulates a company that has stock released on...

  • JAVA Write code to define a Customer class, which has id and name attributes of String...

    JAVA Write code to define a Customer class, which has id and name attributes of String data type and points attribute of integer data type, without breaking encapsulation.

  • Question 3 (CLOS: 3.5) Marks: 4+4 = 8 (a) Write a code in java to make...

    Question 3 (CLOS: 3.5) Marks: 4+4 = 8 (a) Write a code in java to make a class called Animal. The class has data attributes called name. Make one constructor which initializes value of name attribute (b) Make a class called Cat and make it children of Animal class. Declare a variable of the class called age. Make a constructor of this class which initializes both age and name of the class. Make a main method in the class and...

  • java This lab is intended to give you practice creating a class with a constructor method,...

    java This lab is intended to give you practice creating a class with a constructor method, accessor methods, mutator methods, equals method , toString method and a equals method. In this lab you need to create two separate classes, one Student class and other Lab10 class. You need to define your instance variables, accessor methods, mutator methods, constructor, toString method and equals method in Student class. You need to create objects in Lab10 class which will have your main method...

  • Question 1 (24 Marks] 1. (4 marks) Write an immutable Person class in Java which provides...

    Question 1 (24 Marks] 1. (4 marks) Write an immutable Person class in Java which provides the following. • Two attributes: lastName and first Name of type String. • Appropriate initialization, accessors/mutator methods. 2. (6 marks) Write a Student class that is a subclass of Person class (in the previous question) which provides the following. • Two attributes: A unique student ID of type String and GPA of type float; the student ID is initialized when a Student object gets...

  • JAVA you will design and write a class that represents a real-world object of your choice....

    JAVA you will design and write a class that represents a real-world object of your choice. In the second part, you will write a program that demonstrates the use of the class. Part I: Select a "real-world" object that has not been used in class lecture and/or the textbook. The object you choose must be defined by at least: Have at least two characteristics (attributes). Have at least two behaviors (operations). The class that you write to represent the object...

  • In JAVA, please In this module, you will combine your knowledge of class objects, inheritance and...

    In JAVA, please In this module, you will combine your knowledge of class objects, inheritance and linked lists. You will need to first create an object class encapsulating a Trivia Game which INHERITS from Game. Game is the parent class with the following attributes: 1. description - which is a string 2. write the constructor, accessor, mutator and toString methods. Trivia is the subclass of Game with the additional attributes: 1. trivia game id - integer 2. ultimate prize money...

  • Please write in Java Language Write an abstract class Shape with an attribute for the name...

    Please write in Java Language Write an abstract class Shape with an attribute for the name of the shape (you'll use this later to identify a particular shape). Include a constructor to set the name of the shape and an abstract calculateArea method that has no parameters and returns the area of the shape. Optionally, include a constructor that returns the name of the shape and its area (by calling the calculateArea method). Write a Rectangle class that inherits from...

  • [JAVA] Write a class "customer" that has data fields "name" and "lastName." In addition, the accessor...

    [JAVA] Write a class "customer" that has data fields "name" and "lastName." In addition, the accessor methods "get name" and "get last name" should print out the customer name. The class should contain a nested class CreditCard that has a single method "pay." The CreditCard method "pay" should print "Paid." The customer class constructor should take in parameters "name" and "last name." The customer class should have a method "pay" that calls the nested class pay method. Create a test...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT