Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a java program that uses a given Functional Interface that receives two objects, as shown below. Create MainApp class that has the main
Write a java program that uses a given Functional Interface that receives two objects, as shown below. Create MainApp class that has the main method to perform all tasks. @FunctionalInterface interface Genneral Function { R perform (Tt, E e); } 1- Create a lambda expression that receives two array lists and returns an ArrayList that combines both. First ArrayList ="Ben", "Mark", "Emily" Second ArrayList = "Michael", " Jason", "Jane", "Hana" The output (returned ArrayList)= ="Ben", "Mark", "Emily", "Michael", "Jason", "Jane", "Hana" 2- Create a lambda expression that receives two Integer values and returns true if both numbers are prime; otherwise, return false. Note: Apply try-chatch block to catch any potential exceptions Part II: (15 points) Design an UML diagram for an abstract BankAccount class with Savings and Checking Accounts as child classes. Each account has an owner, an account number and a balance. There should be consistent functionality to being able to deposit and withdraw. Savings accounts should be able to accrue interest. Checking accounts need a minimum of $200 to have no monthly charge, otherwise the monthly service fee is $15. Note: - The owner information are (firstName, lastName, MailingAddress, pin:int). - No implemation (Code) is required. Just the UML Diagram. - Use Microsoft word to draw your design.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Part I Java Program with Lambda Expressions To solve this problem well implement the MainApp class in Java This class will use a functional interface ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started