Concept explainers
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...
Trending nowThis is a popular solution!
Chapter 8 Solutions
JAVA PROGRAM(LL)+MINDTAP (1 TERM) V2.0
- Consider the following Turing Machine (TM). Does the TM halt if it begins on the empty tape? If it halts, after how many steps? Does the TM halt if it begins on a tape that contains a single letter A followed by blanks? Justify your answer.arrow_forwardPllleasassseee ssiiirrrr soolveee thissssss questionnnnnnnarrow_forwardPllleasassseee ssiiirrrr soolveee thissssss questionnnnnnnarrow_forward
- Pllleasassseee ssiiirrrr soolveee thissssss questionnnnnnnarrow_forwardPllleasassseee ssiiirrrr soolveee thissssss questionnnnnnnarrow_forward4. def modify_data(x, my_list): X = X + 1 my_list.append(x) print(f"Inside the function: x = {x}, my_list = {my_list}") num = 5 numbers = [1, 2, 3] modify_data(num, numbers) print(f"Outside the function: num = {num}, my_list = {numbers}") Classe Classe that lin Thus, A pro is ref inter Ever dict The The output: Inside the function:? Outside the function:?arrow_forward
- python Tasks 5 • Task 1: Building a Library Management system. Write a Book class and a function to filter books by publication year. • Task 2: Create a Person class with name and age attributes, and calculate the average age of a list of people Task 3: Building a Movie Collection system. Each movie has a title, a genre, and a rating. Write a function to filter movies based on a minimum rating. ⚫ Task 4: Find Young Animals. Create an Animal class with name, species, and age attributes, and track the animals' ages to know which ones are still young. • Task 5(homework): In a store's inventory system, you want to apply discounts to products and filter those with prices above a specified amount. 27/04/1446arrow_forwardOf the five primary components of an information system (hardware, software, data, people, process), which do you think is the most important to the success of a business organization? Part A - Define each primary component of the information system. Part B - Include your perspective on why your selection is most important. Part C - Provide an example from your personal experience to support your answer.arrow_forwardManagement Information Systemsarrow_forward
- Q2/find the transfer function C/R for the system shown in the figure Re དarrow_forwardPlease original work select a topic related to architectures or infrastructures (Data Lakehouse Architecture). Discussing how you would implement your chosen topic in a data warehouse project Please cite in text references and add weblinksarrow_forwardPlease original work What topic would be related to architectures or infrastructures. How you would implement your chosen topic in a data warehouse project. Please cite in text references and add weblinksarrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,