JAVA PROGRAM(LL)+MINDTAP (1 TERM) V2.0
JAVA PROGRAM(LL)+MINDTAP (1 TERM) V2.0
9th Edition
ISBN: 9780357616673
Author: FARRELL
Publisher: CENGAGE L
bartleby

Concept explainers

Expert Solution & Answer
Book Icon
Chapter 8, Problem 10PE

Explanation of Solution

Program:

File name: “CertOfDeposit.java

//Import necessary header files

import java.time.LocalDate;

//Define a class named CertOfDeposit

public class CertOfDeposit

{

    //Declare the private variables

    private int certificateNumber;

    private String lastName;

    private double balance;

    private LocalDate issueDate;

    private LocalDate maturityDate;

    /*Define a constructor that sets the instance variables

    to class CertOfDeposit */

public CertOfDeposit(int certificateNumber,String lastName,double balance, LocalDate issueDate)

    {

        //Refers to the instance variables

        this.certificateNumber=certificateNumber;

        this.lastName=lastName;

        this.balance=balance;

        this.issueDate=issueDate;

        this.maturityDate=issueDate.plusYears(1);

    }

    //Define a method that sets the certificate number

    public void setCertificateNumber(int certificateNumber)

    {

        this.certificateNumber=certificateNumber;

    }

    //Define a method that sets the last name

    public void setLastName(String lastName)

    {

        this.lastName=lastName;

    }

    //Define a method that sets the balance amount

    public void setBalance(double balance)

    {

        this.balance=balance;

    }

    //Define a method that sets the issue date

    public void setIssueDate(LocalDate issueDate)

    {

        this.issueDate=issueDate;

    }

    //Define a method that sets the maturity date

    public void setMaturityDate(LocalDate maturityDate)

    {

        this.maturityDate=maturityDate;

    }

    //Define a method that returns the certificate number

    public int getCertificateNumber()

    {

        //Return the value

        return certificateNumber;

    }

    //Define a method that returns the last name

    public String getLastName()

    {

        //Return the value

        return lastName;

    }

    //Define a method that returns the balance amount

    public double getBalance()

    {

        //Return the value

        return balance;

    }

//Define a method that returns the issue date as LocalDate object

    public LocalDate getIssueDate()

    {

        //Return the value

        return issueDate;

    }

//Define a method that returns the maturity date as LocalDate object

    public LocalDate getMaturityDate()

    {

        //Return the value

        return maturityDate;

    }

}

File name: “CertOfDepositArray.java

//Import necessary header files

import java.time.LocalDate;

import java.util.Scanner;

//Define a class named CertOfDepositArray

public class CertOfDepositArray

{

    //Define a main method

    public static void main(String[] args)

    {

        //Declare the variables

        int certificateNumber;

        String name;

        double balance;

        int day;

        int month;

        int year;

        final int size=5;

        //Create an object for Scanner class

        Scanner scanner=new Scanner(System...

Blurred answer
Students have asked these similar questions
23:12 Chegg content://org.teleg + 5G 5G 80% New question A feed of 60 mol% methanol in water at 1 atm is to be separated by dislation into a liquid distilate containing 98 mol% methanol and a bottom containing 96 mol% water. Enthalpy and equilibrium data for the mixture at 1 atm are given in Table Q2 below. Ask an expert (a) Devise a procedure, using the enthalpy-concentration diagram, to determine the minimum number of equilibrium trays for the condition of total reflux and the required separation. Show individual equilibrium trays using the the lines. Comment on why the value is Independent of the food condition. Recent My stuff Mol% MeOH, Saturated vapour Table Q2 Methanol-water vapour liquid equilibrium and enthalpy data for 1 atm Enthalpy above C˚C Equilibrium dala Mol% MeOH in Saturated liquid TC kJ mol T. "Chk kot) Liquid T, "C 0.0 100.0 48.195 100.0 7.536 0.0 0.0 100.0 5.0 90.9 47,730 928 7,141 2.0 13.4 96.4 Perks 10.0 97.7 47,311 87.7 8,862 4.0 23.0 93.5 16.0 96.2 46,892 84.4…
You are working with a database table that contains customer data. The table includes columns about customer location such as city, state, and country. You want to retrieve the first 3 letters of each country name. You decide to use the SUBSTR function to retrieve the first 3 letters of each country name, and use the AS command to store the result in a new column called new_country.  You write the SQL query below. Add a statement to your SQL query that will retrieve the first 3 letters of each country name and store the result in a new column as new_country.
We are considering the RSA encryption scheme. The involved numbers are small, so the communication is insecure.  Alice's public key (n,public_key) is (247,7). A code breaker manages to factories  247 = 13 x 19  Determine Alice's secret key. To solve the problem, you need not use the extended Euclid algorithm, but you may assume that her private key is one of the following numbers 31,35,55,59,77,89.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
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
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,