EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
8th Edition
ISBN: 9781305480537
Author: FARRELL
Publisher: CENGAGE LEARNING - CONSIGNMENT
Question
Book Icon
Chapter 4, Problem 11PE

a.

Program Plan Intro

CertOfDeposit

Program Plan:

CertOfDeposit.java:

  • Define the class “CertOfDeposit”.
    • Declare and initialize the required variable.
    • Definition of constructor.
      • Assign the variables.
      • Define the mutator method for certificate number.
        • Assign “n” to “certNum”.
      • Define the mutator method for owner name.
        • Set the name.
      • Define the mutator method for balance.
        • Set the balance.
      • Define the mutator method for issue date..
        • Set the balance.
      • Define the accessor method for certificate number.
        • Return the certificate number.
      • Define the accessor method for name.
        • Return the name
      • Define the accessor method for balance.
        • Return the balance.
      • Define the accessor method for issue date.
        • Return the issue date.
      • Define the accessor method for maturity date.
        • Return the maturity date.

b.

Program Plan Intro

TestCertOfDeposit.java

Program Plan:

TestCertOfDeposit.java:

  • Define the class “TestCertOfDeposit”.
    • Definition of method main.
    • Declare the required variable.
      • Get the certificate name from the user.
      • Get the owner name from the user.
      • Get the balance from the user.
      • Get the issue date from the user.
      • Call the method “display()”.
  • Definition of method “display()”.
    • Print the details of the certificate.

Blurred answer
Students have asked these similar questions
Create a class Course to describe a course according to the following requirements: A course has three attributes: courseName, courseCode, fees. Create a constructor without parameters to initialize all the instance variables to default values (0 for numbers and "" for a string). Create a constructor to initialize all the attributes to specific values. Add all setter and getter methods Create a tester class with the main method. The tester class must be named using your first and last In this class performs the following: Create a course object c1 using the default constructor. Create a course object c2 with the following information: courseName =” object oriented programing”, courseCode = “CS230” , fees = a value from your choice. Change the course fees of c2 to your age. Print the course information of c2 using getter methods   I attached Typical run of the program
Create a class named Person that holds the following fields: two String objects for the person’s first and last name and a LocalDate object for the person’s birthdate. Create a class named Couple that contains two Person objects. Create a class named Wedding for a wedding planner that includes the date of the wedding, the Couple being married, and a String for the location. Provide constructors for each class that accept parameters for each field, and provide get methods for each field.
Create a class named BloodData that includes fields that hold a blood type (the four blood types are O, A, B, and AB) and a Rh factor (the factors are + and –). Create a default constructor that sets the fields to O and +, and an overloaded constructor that requires values for both fields. Include get and set methods for each field. Create a class named Patient that includes id, age, and bloodData fields. Provide a default constructor that sets the ID number to 0, the age to 0, and the BloodData values to O and +. Create an overloaded constructor that provides values for each field. Also provide get methods for each field. The TestBloodData.java and TestPatient.java files have been provided to test your implementation of each class. Code is in java.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
    Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,