Implement the CertOfDepositArray application to accept data for an array of five CertOfDeposit objects, and then display the data.
The program should prompt the user for the following information (in order):
Certificate #
Last name
Balance
Month of issue
Day of issue
Year of issue
The program should display the year the certificate matures, which is one year after it was issued, in the format YYYY-MM-DD.

Answers

Answer 1

Sure, here is the Java code for the CertOfDepositArray application:

import java.util.Scanner;

import java.time.LocalDate;

public class CertOfDepositArray {

   public static void main(String[] args) {

       Scanner sc = new Scanner(System.in);

       // Create an array of five CertOfDeposit objects

       CertOfDeposit[] cds = new CertOfDeposit[5];

       // Prompt the user for information for each certificate

       for (int i = 0; i < cds.length; i++) {

           System.out.print("Enter certificate # " + (i + 1) + ": ");

           String certNum = sc.next();

           System.out.print("Enter last name: ");

           String name = sc.next();

           System.out.print("Enter balance: ");

           double balance = sc.nextDouble();

           System.out.print("Enter month of issue: ");

           int month = sc.nextInt();

           System.out.print("Enter day of issue: ");

           int day = sc.nextInt();

           System.out.print("Enter year of issue: ");

           int year = sc.nextInt();

           // Create a new CertOfDeposit object and add it to the array

           cds[i] = new CertOfDeposit(certNum, name, balance, LocalDate.of(year, month, day));

       }

       // Display the data for each certificate

       for (CertOfDeposit cd : cds) {

           System.out.println("Certificate #" + cd.getCertNum() + ", Last name: " + cd.getName() + ", Balance: $" + cd.getBalance() + ", Issued: " + cd.getIssueDate() + ", Matures: " + cd.getMaturityDate());

       }

   }

}

class CertOfDeposit {

   private String certNum;

   private String name;

   private double balance;

   private LocalDate issueDate;

   private LocalDate maturityDate;

   public CertOfDeposit(String certNum, String name, double balance, LocalDate issueDate) {

       this.certNum = certNum;

       this.name = name;

       this.balance = balance;

       this.issueDate = issueDate;

       this.maturityDate = issueDate.plusYears(1);

   }

   public String getCertNum() {

       return certNum;

   }

   public String getName() {

       return name;

   }

   public double getBalance() {

       return balance;

   }

   public LocalDate getIssueDate() {

       return issueDate;

   }

   public LocalDate getMaturityDate() {

       return maturityDate;

   }

}


Related Questions

VOCAL NEUTRA
1.- Escriu una frase amb cadascuna de les parelles de mots:
• El mestre, la mestra
• El quadre, la quadra
• Un acte, una acta
• Un assumpte, l'Assumpta
• La ministra, el ministre
• La conducta, el conducte
• La moda, el mode
• La cova, el cove

Answers

Answer:

la coca el cove

la acre una acta

if a homeland security advisory threat level of "high" is issued, you should:

Answers

A homeland security advisory threat level of "high" is issued, you should: remain vigilant, report any suspicious activity to law enforcement, and review your emergency preparedness plans.

Make sure to stay informed about the situation by monitoring news updates and official announcements from authorities. Adjust your travel plans, if necessary, and follow any guidance provided by government officials.

Additionally, ensure that you have necessary supplies and communication means in case of emergencies. Remember, maintaining public safety is a collaborative effort, so do your part to stay informed, prepared, and proactive during periods of heightened alert.

Learn more about homeland security at:

https://brainly.com/question/4673728

#SPJ11

as their first language, 90 percent of europe's population speak languages from what three groups?

Answers

AS their first language, 90 percent of europe's population speak languages Romance, Germanic, and Slavic.

What is the languages about?

Europe's history is conventionally classified into four distinct epochs, namely: prehistoric era (predating 800 BC), classical antiquity era (800 BC to 500 AD), medieval times (500-1500 AD) and the modern age (1500 AD and beyond).

Approximately 94% of the 744 million European individuals in 2018 possess proficiency in an Indo-European language as their mother tongue. The three major groupings of the Indo-European language family in Europe are Romance, Germanic, and Slavic, each with over 200 million speakers and collectively representing almost 90% of the European population.

Learn more about language from

https://brainly.com/question/10585737

#SPJ1

Norton feels that dogs should be allowed to the beach in his city. He wishes to remove the long-standing rule that does not allow citizens to bring their dogs to the beach. He prepares to speak to members of the city council about fencing off a section of the beach where people can bring their dogs. To ensure his persuasive message is ethical, Norton should:
A. ​insist on immediate action and not wait for the council to evaluate alternative solutions. B. argue for his belief to bring about the change because he genuinely endorses it. C. ​use excessive emotional appeals as the basis of his message.
D. act as if he knows a great deal about animal rights laws when he actually does not.

Answers

Norton should choose option B. argue for his belief to bring about the change because he genuinely endorses it.

This option ensures that Norton presents his case based on his genuine belief and endorsement of allowing dogs on the beach. By presenting his argument honestly and sincerely, Norton maintains ethical communication. It is important for Norton to express his viewpoint in a respectful manner, providing logical reasoning and evidence to support his stance.

Options A, C, and D would not be considered ethical approaches. Option A suggests insisting on immediate action without allowing the council to evaluate alternative solutions, which undermines the democratic process and the importance of considering different perspectives. Option C suggests using excessive emotional appeals, which can manipulate emotions and be seen as an unethical tactic to sway opinions. Option D suggests pretending to possess knowledge about animal rights laws that Norton actually does not have, which is dishonest and misleading.

_____________ theory is the idea that people learn through observation to model the behaviors they see.
A) Selective observation
B) Excitation
C) Social cognitive
D) Vicarious reinforcement

Answers

Social cognitive theory is the idea that people learn through observation to model the behaviors they see. So, the correct option is C.

The social cognitive theory proposes that people learn by observing others and modeling their behavior. The theory was defined by Albert Bandura, a prominent psychologist who studied human behavior. Bandura was interested in this theory because he believed that it could explain how people learn and change their behavior. Albert Bandura is a Canadian-American psychologist who is best known for his work on social learning theory and self-efficacy.

According to the social cognitive theory, behavior is defined as the actions and reactions of an individual in response to their environment. Examples of social cognitive behavior:

A child imitates the actions of their parents or peers.

A child learns to share toys by observing their peers.


Therefore, C) Social Cognitive is the option.

To know more about Social Cognitive Theory visit:

https://brainly.com/question/31359166

#SPJ11

identify the nouns in the following sentence: debby drove to the store for a gallon of milk.

Answers

In the given sentence "Debby drove to the store for a gallon of milk." the nouns are Debby - Store - Gallon - Milk.

These words are nouns because they represent a person (Debby), a place (store), and objects or things (gallon and milk).

There are several types of nouns, including common nouns, proper nouns, abstract nouns, concrete nouns, collective nouns, and countable/uncountable nouns.

The nouns in the sentence "Debby drove to the store for a gallon of milk" are:
- Debby (proper noun)
- store (common noun)
- gallon (countable noun)
- milk (uncountable noun)

In the sentence "Debby drove to the store for a gallon of milk," the nouns are Debby (proper noun), store (common noun), gallon (countable noun), and milk (uncountable noun).

To know more about Nouns visit:

https://brainly.com/question/30249124

#SPJ11

Dithethefatsi ke Eng ?​

Answers

Dithetefatsi means drugs

write the action scene that occurs between the two. hero encounters a monster

Answers

The action scene that occurs between how the two. hero encounters a monster is given below.

What is the  action scene?

The brave protagonist carefully advances towards the shadowy cavern. Out of nowhere, a huge beast suddenly springs forward. They are embroiled in an intense conflict. The protagonist deftly avoids the monster's assaults.

The hero delivers a potent hit with quickness and precision. The creature lets out an agonizing loud cry and responds with great hostility. The protagonist responds with a rapid succession of attacks. They engage in a heated battle, with both combatants striving for triumph. The protagonist locates a vulnerable spot and executes a powerful attack. The defeated monster collapses onto the ground.

Learn more about hero from

https://brainly.com/question/1415908

#SPJ1

EXPLAIN THESE LINES:-
______________________________
ye jaan lekar ke jaan meri
tumhe jeene main aaya hoon
main tumse ishq karne ki
ijaazat rab se laaya hoon​

Answers

These lines are from a Hindi song and can be roughly translated as follows:

[tex]\red{\rule{200pt}{2pt}}[/tex]

"Having known this, my life,

I have come to bring you to life.

I have obtained permission from God

to love you."

[tex]\red{\rule{200pt}{2pt}}[/tex]

These lines express a deep emotional connection and commitment to someone. The speaker is declaring that they have found a purpose in life by discovering the person they are addressing. They believe that their love for this person has been granted by a higher power, symbolized by "ijaazat rab se" (permission from God). The lines convey a sense of devotion and a strong desire to be with the person they love.[tex][/tex]

by default the if stream object is used to open files for _access

Answers

By default, the if stream object is used to open files for reading, which means that option B, "Read", is the correct option.

The ifstream object is a standard C++ class used for reading input from files. By default, the ifstream (input file stream) object is used to open files for reading a specific type of access. It provides methods to read and extract data from files, such as getline() for reading strings and >> operator for reading various data types. This allows you to read data from a file, but not to modify or write new data to it.

However, it is important to note that the if stream object can also be used for writing and accessing files, but it requires additional flags to be set when opening the file.

Therefore, the correct option is B.

Complete Question

By default the if stream object is used to open files for _access.

A. write

B. read

To know more about C++ visit:

https://brainly.com/question/13567178

#SPJ11

Why do children make language errors?

Answers

Children make language errors because they are still learning and developing their language skills.

They may not have fully grasped the grammar and vocabulary rules yet, and may struggle with pronunciation and syntax.

Here are several reasons children make language errors:

1. Incomplete language acquisition: As children are still in the process of learning and acquiring language skills, they may not yet have full understanding of grammar rules, vocabulary, and pronunciation, leading to errors.

2. Overgeneralization: Children often overgeneralize language rules they have learned. For example, they may apply the regular past tense "-ed" ending to irregular verbs, resulting in errors like "eated" instead of "ate."

3. Limited exposure: Children may make errors because they have had limited exposure to certain language structures or vocabulary, causing them to rely on their existing knowledge and make incorrect assumptions.

4. Imitation: Children may imitate language errors they hear from their peers or adults, leading to the repetition of those errors in their own speech.

5. Cognitive development: Language errors can also be attributed to the cognitive development of children. As their brains continue to develop, they gradually become better at understanding and using language correctly.

In summary, children make language errors because they are still in the process of learning and developing their language skills, leading to incomplete language acquisition, overgeneralization, limited exposure, imitation of others, and cognitive development.

To know more about Language Development visit:

https://brainly.com/question/14411148

#SPJ11

2.1 Present five incidences, as examples, where sports personalities' rights were violated (5X2-10)​

Answers

Some cases where the rights of sports personalities have been violated may be:

Gender discriminationRacial discriminationViolation of privacyViolation of freedom of expressionExplorationHow were these rights violated?

Discrimination is a practice that can occur in any social sphere, as well as in sports, where racism has already been suffered by several athletes, as seen in the manifestation of the pilot Lewis Hamilton.

Therefore, there are also complaints about the exploitation of athletes who train exhausting hours daily without protection and labor rights, as well as claims about harassment, gender inequality, etc., which are situations that need change and legal hardening.

Find out more about human rights at:

https://brainly.com/question/1261546

#SPJ1

Answer to the photo attached

Answers

राष्ट्रीय गीतों को सुनकर उत्साह और देशभक्ति जागृत होती है क्योंकि:

एक भावनात्मक जुड़ाव है, यह हमारी सांस्कृतिक पहचान है, यह एकता और एकजुटता लाता है, इसमें प्रतीकवाद और प्रतीकात्मक भाषा है, यह हमारे ऐतिहासिक इतिहास को दर्शाता है।

राष्ट्रीय गीत क्या होते हैं?

राष्ट्रीय गीत, जिसे देशभक्ति गीत या गान भी कहा जाता है, अपने भावनात्मक और ऐतिहासिक महत्व के कारण उत्साह और देशभक्ति पैदा कर सकता है।

राष्ट्रीय गीत साझा विरासत, संस्कृति और पहचान को जगाते हैं, मजबूत भावनाओं और अपनेपन की भावना को प्रज्वलित करते हैं। वे देश के अद्वितीय सांस्कृतिक तत्वों, परंपराओं और मूल्यों को दर्शाते हैं। वे अपने राष्ट्र की भाषा, इतिहास, नायकों और उपलब्धियों का संगीत के माध्यम से सम्मान करते हैं, सांस्कृतिक गौरव पैदा करते हैं। राष्ट्रीय गीत विभिन्नताओं के बावजूद लोगों को एक सूत्र में पिरोते हैं।

Learn more about songs from

https://brainly.com/question/24370565

#SPJ1

See text below



GO LEARNERS

INTERNATIONAL SCHOOL

Name

अथर्व अरोरा (Atharv dhara)

Grade - VI

Learning Objective : काव्य विधा की समझ, व्याकरण का ज्ञान ।

कौमी गानों को सुनकर जोश और देशभक्ति क्यों जाग उठती है?

See transcribed text below

Learning Objective: Understanding of poetic style, knowledge of grammar.

Why does listening to national songs evoke enthusiasm and patriotism?

good morning skipper,my sunshine,my light,how are you feeling? in spanish

Answers

The Spanish translation of the phrase "Good morning skipper, my sunshine, my light, how are you feeling?" is : "¡Buenos días, capitán, mi sol, mi luz! ¿Cómo te sientes?".

This phrase is an example of a greeting in Spanish, and it means "Good morning, Captain, my sunshine, my light. How are you feeling?" This greeting is a good way to show affection and respect for someone.The word "buenos" means "good," "días" means "day," and "Capitán" means "captain."

"Mi sol" means "my sunshine," and "mi luz" means "my light." Finally, "¿Cómo te sientes?" means "How are you feeling?"In Spanish, it is common to use terms of endearment like "mi sol" or "mi luz" when addressing someone. These phrases are used to express love, affection, and respect for the person being addressed.

It's a warm and friendly way to check in with someone and make them feel appreciated. Knowing a few basic phrases in Spanish can help you connect with Spanish-speaking people and show them that you care.

Learn more about Spanish language at:

https://brainly.com/question/25793113

#SPJ11

what is the most common language group in central asia, based on the number of native speakers?

Answers

Answer:

The most common language group in Central Asia is the Turkic language group. Turkic languages are spoken by about 180 million people in Central Asia, Turkey, Azerbaijan, Kazakhstan, Kyrgyzstan, Uzbekistan, Turkmenistan, and other parts of the world. The Turkic language family is believed to have originated in Central Asia, and it is thought to have split into its current branches about 2,000 years ago. The Turkic languages are divided into two main branches: the Oghuric branch and the Kipchak branch. The Oghuric branch includes languages such as Turkish, Azerbaijani, and Chuvash. The Kipchak branch includes languages such as Kazakh, Kyrgyz, Uzbek, Turkmen, and Uyghur.

Here are some of the most common Turkic languages spoken in Central Asia:

* Kazakh: 18 million speakers

* Kyrgyz: 6 million speakers

* Uzbek: 30 million speakers

* Turkmen: 5 million speakers

* Uyghur: 10 million speakers

In addition to the Turkic languages, there are also a number of other languages spoken in Central Asia, including Russian, Tajik, and Persian.

Other Questions
51) Gretchen expects the price level to rise from 104 this year to 108 next year, and she is able to incorporate these expectations into her wage contract. If the price level rises to 106 next year instead of 108, which of the following will occur? A) Gretchen's real wage will be unchanged. B) Gretchen's real wage will fall C) Gretchen's real wage will rise. D) Gretchen's real wage may rise or fall, depending on the unemployment rate 52) The key to understanding the short-run trade-off behind the Phillips curve is that an increase in inflation will decrease unemployment if the inflation is by both workers and firms. B) expected C) perfectly predicted D) ignored 53) Employees at the hospital have negotiated a 3 percent increase in wages for the next year, based on their inflation expectations. If inflation is actually 5 percent over the next year, which of the following will occur? A) Unemployment of hospital employees will rise. B) Real wages for hospital employees will fall. C) Inflation will be 3 percent the following year D) The increase in inflation is expected. How many moles of HCl will be produced when 249 g of ALCL3 are reacted according to this chemical equation what is the correct hand placement when performing chest compressions on an adult? which of the following actions is not advisable in a plan to change a behavior for better health? Certain types of fibers and complex proteins that are degraded by GI bacteria are called ____.a. prebioticsb. probioticsc. postbioticsd. symbioticse. abiotics what may be the effects of childcare on child well-being, according to research? the nuclide 236np can decay by any of three different nuclear processes: emission, emission, or electron capture. write a balanced nuclear equation for the decay of 236np by each process. In modern turboprop engines, nearly 50% of the exhaust gas energy is extracted by turbines to drive the propeller and compressor, with the rest providing exhaust thrust. True or False? if you're driving in packed snow, cut your speed _____ of what you'd normally drive. the perspective contends that labeling can create self-fulfilling prophecies. conflict functionalist symbolic interactionist feminist Data has been collected on the number of black seeds ard yellow= seeds on J cob of com; You hypothesize Ihat you expecl l0 see a 3 1 phenotypic ratio of black yellow sceds Calculate the expecledyalue for each phenotype based on the hypothesis Black Ydlow = 4.45 black 1 Ycllow 81 black 18 Ycllow 40 Black , 20 Ycllov? 45 Black_ 15 Ycllaw? when instrumenting root surfaces, treat each root as a separate tooth. the toe of the curet can be used against the roof of the furcation on a mandibular molar. The income statement, balance sheet and additional information for Video Phones Inc. are provided.VIDEO PHONES INC.Income StatementFor the Year Ended December 31, 2015Net sales $3,436,000Expenses:Cost of goods sold $ 2,250,000 Operating expenses 918,000 Depreciation expense 33,000 Loss on sale of land 8,600 Interest expense 18,000 Income tax expense 54,000 Total expenses 3,281,600Net income $154,400VIDEO PHONES INC.Balance SheetDecember 312015 2014AssetsCurrent assets:Cash $267,160 $194,280Accounts receivable 87,600 66,000Inventory 105,000 141,000Prepaid rent 13,440 6,720Long-term assets:Investments 111,000 0Land 216,000 252,000Equipment 282,000 216,000Accumulated depreciation (76,200) (43,200)Total assets $1,006,000 $832,800Liabilities and Stockholders' EquityCurrent liabilities:Accounts payable $71,400 $87,000Interest payable 6,600 11,200Income tax payable 15,600 14,600Long-term liabilities:Notes payable 297,000 231,000Stockholders' equity:Common stock 360,000 360,000Retained earnings 255,400 129,000Total liabilities and stockholders' equity $1,006,000 $832,800Additional Information for 2015:1. Purchase investment in bonds for $111,000.2. Sell land costing $36,000 for only $27,400, resulting in a $8,600 loss on sale of land.3. Purchase $66,000 in equipment by borrowing $66,000 with a note payable due in three years. No cash is exchanged in the transaction.4. Declare and pay a cash dividend of $28,000.Required:Prepare the statement of cash flows for Video Phones Inc. using the direct method.Disclose any non-cash transactions in an accompanying note. be two different bases for R2R2.Find the matrix [f]BB[f]BB for ff relative to the basis BB.Find the matrix [f]CC[f]CC for ff relative to the basis CC.Find the transition matrix [I]BC[I]CB from CC to BB.Find the transition matrix [I]CB[I]BC from BB to CC. (Note: [I]CB=([I]BC)1[I]BC=([I]CB)1.) which football icon lends his name to one of the best-selling video game franchises in history? the new madrid seismic zone is an earthquake-prone area near the midwest part of the us. A nurse is teaching a client about magnesium hydroxide with aluminum hydroxide (Maalox). What instruction is most appropriate?a. Aspirin must be avoided.b. Do not worry about black stools.c. Report diarrhea to your provider.d. Take 1 hour before meals. selected localities on worlds. Based on our current scientific understanding, match these items to the appropriate category belowLikely to be habitable- underground on Mars- subsurface ocean on Europa- moon with atmosphere orbiting jovian planet 1 AU from 1 Msun starUnlikely- surface of Mars- surface of terrestrial planet 10 AU from 0.5 Msun star- volcanoes on Io A key factor leading to John F.Kennedy's victory in the 1960 presidential election was his what? Express the graph shown in color using interval notation. Also express the graph as an inequality involving x.