Write a Java application that implements the following class(es) as per business requirements mentioned below:
Create an abstract Insurance class (Insurance.java) that has the following instance variables:
- Insurance number,
- customer name,
- start date of policy ( This should be represented by an object of predefined date class in java),
- customer address [( Create a new Address class ( Address.java ) having following instance data members: House number , Street name, City, Province, Zip code. Implement getter and setter and toString() method for Address class. )]
- Define getter and setter along with validations for all the above instance variables.
- Insurance class should have defined two overloaded constructors: o One for initializing all the instance data members to their default values
o Second for initializing only Insurance number, customer name, start date of policy and address
- Declare an abstract public method double MonthlyPayments() which is used for calculating monthly Insurance installment amount.
- Define toString() to display the values
Create following two subclasses of Insurance class:
• a) LifeInsurance (LifeInsurance.java)
• b) VehicleInsurance (VehicleInsurance .java)
For LifeInsurance class, implement the following:
- Define an instance variable – age of the person. Minimum is 1 and Max is 100.
- Define another Boolean variable – smoker.
- Define getters and setters for the above and validations.
- A constructor for initializing all the instance variables with appropriate values.
- Overriding the method - double MonthlyPayments () which calculates monthly insurance installment.
- Business requirements for calculating the yearly insurance – if the person is <= 25 years of age, then yearly insurance amount is $1500.00. if between 26 and 45, then it is 1.5 times and if above 45, then it is two times of the amount. And if the person is smoker, then add $250.00 to yearly insurance amount but if a person is non-smoker, then give 5% discount on yearly insurance amount before calculating the monthly installment. You need to add GST also which is 13%.
- You need to override toString() method to display the object’s data.
For VehicleInsurance class, implement the following:
- Define an instance variable – model year. It cannot be more than 2020 which is current year. And vehicle cannot be older than 15 years. So if current year is 2020 then model year should >= 2005.
- Define another Boolean instance variable – greenVehicle. (yes – means – electric, no means gasoline)
- Constructor for initializing all the instance variables
- Overriding the method - double MonthlyPayments () which calculates monthly vehicle insurance installment
- Business requirements for calculating the yearly insurance – if the vehicle is <= 5, then yearly insurance amount is $3000.00. if between 6 and 10, then 1.5 times and if above 10, then it two times of the amount. And if the vehicle is not green, then add $300.00 as environment fee to yearly insurance amount but if a vehicle is green, then give 10% discount on yearly insurance amount. You need to add GST also which is 13%.
- You need to override toString() method to display the object’s data.
Create a driver class – InsuranceTest (InsuranceTest.java) which tests above classes by at least creating two objects each of the LifeInsurance and VehicleInsurance classes and then processing them normally and polymorphically
In: Computer Science
When performing a REAGENT BLANK in chemistry, do you add or subtract the volume of the blank determination from the volume of titrant to get the corrected volume of titrant used? In this particular experiment we are determining Ca2+ and Mg2+ in natural water samples. And, do you always add or subtract the blank reagent or does it change with reactions? Probably simple questions but they have me completely stumped. Thanks!
In: Chemistry
is all conflict bad? share some situations
In: Psychology
1.) Briefly outline and describe the five generic competitive strategies? Illustrate a specific example of each generic strategy in your description?
Your answers will be short essays and should be three full paragraphs or longer.
In: Operations Management
In: Computer Science
Please give examples for my study guide, Thank You
In: Computer Science
Netflix Now that you’ve identified the organization’s SWOT, you need to determine the project and its objectives and metrics. This project should be based on an unmet opportunity for the organization, or to minimize a potential threat. What does the organization need to do to advance its goals and/or expand its competitive advantage? How will you measure their progress? Complete the following: Explain why this opportunity/threat was selected, and how it is anticipated to benefit the organization. Create at least 3 measurable project objectives based on your analyses. Determine timelines and responsibilities for each objective (e.g. with a RACI chart) Explain why these objectives are appropriate for the project. Develop at least 2 metrics to evaluate achievement of each of the project objectives. Provide a 1-page explanation for why these are appropriate metrics for each of the objectives.
In: Operations Management
1.) What is the role of the Chief Executive Officer (CEO) in the strategy formulation and strategy execution process? Why has their job become increasingly difficult?
Your answers will be short essays and should be three full paragraphs or longer.
In: Operations Management
1. Complete the following table using 8-bit representation ((show your work to get credit)
Decimal |
Signed Magnitude |
One’s Complement |
Two’s Complement |
30 |
|||
-47 |
|||
0 |
In: Computer Science
Explain how you could argue AGAINST the practice of Female Genital Mutilation in Ethical Choices). How does this undercut the core ideas of cultural relativism?
In: Psychology
Discussion - Common add on devices in virtualization and their solutions
In: Computer Science
Yumi's grandparents presented her with a gift of $20,000 when she was 9 years old to be used for her college education. Over the next 8 years, until she turned 17, Yumi's parents had invested her money in a tax-free account that had yielded interest at the rate of 3.5%/year compounded monthly. Upon turning 17, Yumi now plans to withdraw her funds in equal annual installments over the next 4 years, starting at age 18. If the college fund is expected to earn interest at the rate of 4%/year, compounded annually, what will be the size of each installment? (Assume no interest is accrued from the point she turns 17 until she makes the first withdrawal
In: Finance
JAVASCRIPT: /* Assignment 03: Complete this javascript */ // 1) Declare a variable named myValue // Assign myValue the value of "Hello, how's it going?" // Print the value of myValue to the console // 2) Use the charAt() method to display the letter t // from the variable myValue in the console // 3) Use the indexOf() method to display the position of "going" // from the variable myValue in the console // 4) Use the slice() method to display "how's it going?" // from the variable myValue in the console // 5) Declare a variable named myOtherValue // Assign myOtherValue the value of "Ok?" // Use the concat() method on the variable myValue // to concatenate myValue and myOtherValue // Specify a new line as the first parameter of concat() // Print the result to the console // 6) Declare a variable named myRandom // Assign myRandom a non-rounded value between 0 and 1 using Math.random() // Print the result to the console // 7) Now assign a random value between 1 and 10 to myRandom // Use Math.floor() and Math.random() to accomplish this // Print the result to the console // 8) Print the length of the variable myValue to the console // 9) Set the contents of the variable myValue to all lowercase // Find the method to do this on your own // Print the variable to the console to show it now holds all lowercase // 10) **Solving a problem! // Declare a variable named myName and assign it your first name // Utilize the length property, Math.floor(), Math.random() and charAt() // methods to write a line of code that will randomly display a character // from your firstname in the console... refer to the examples of each // method at w3schools.com and MDN Web Docs
In: Computer Science
1.) What are some tests of a good strategy? How do we know if a company’s strategy is working? What are some options for a company if their strategy is not working?
Your answers will be short essays and should be three full paragraphs or longer.
In: Operations Management
Are The Broken Window Theory and Incrementalism similar or different? How? Mention specific examples. 300 words
Incrementalism (Referred to as the slippery slope, incrementalism describes how we unconsciously lower our ethical standards over time through small changes in behavior.)
In: Operations Management