Write an application named useinsurance

Assignment Help Programming Languages
Reference no: EM13694521

Question: Write an application named UseInsurance that uses an abstract Insurance class and Health and Life subclasses to display different types of insurance policies and the cost per month. The Insurance class contains a String representing the type of insurance and a double that holds the monthly price.

The Insurance class constructor requires a String argument indicating the type of insurance, but the Life and Health class constructors require no arguments. The Insurance class contains a get method for each field; it also contains two abstract methods named setCost() and display().

The Life class setCost() method sets the monthly fee to $36, and the Health class sets the monthly fee to $196.

Write an application named UseInsurance that prompts the user for the type of insurance to be displayed, and then create the appropriate object.

Save the files as Life.java, Health.java, Insurance.java, and UseInsurance.java.

Make this program using java programming. Make this application in simple way.

Reference no: EM13694521

Questions Cloud

Find a regular expression for the language : Find a regular expression for the language over {a, b} that consists of all strings containing exactly one occurrence of substring ab.
How long will it take the program to run : How long will it take the program to run with 1000 processors, if each processor is as fast as the single processor on which the serial program was run?
Describe which base class members may not be inherited : Without considering the access attributes, list and describe which base class members may not be inherited by a derived class and provide a rationale for why this is.
How to sort an array using insertion sort : How to sort an array using insertion sort and track teh number of swaps during the sorting - Can someone provide the answer with reference to data structure?
Write an application named useinsurance : Write an application named UseInsurance that prompts the user for the type of insurance to be displayed, and then create the appropriate object.
How do you make a row with different string names : How do you make a row with different string names and put a certain amount of space between each one?
What is qos what is it used for and how does it work : What is QOS what is it used for and how does it work and What are the differences between Inserv and Diffserv
What is the expected time to find a key by exhaustive : Given a computer that can test 2^40 keys each second. What is the expected time to find a key by exhaustive search given a key space, say 2^88. How do you go about figuring this out? Is there a formula or standard equation that is used?
Calculate and display the area of the rectangle : Calculate and display the area of the rectangle and the total price of the tile. Add comments in code section. Code this program in java programming.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write program to calculate cost of flowers sold at stand

Write down the program in class FlowerCounter which calculates the cost of flowers sold at flower stand. Five types of flowers-petunia, pansy, rose, violet, and camation- are stocked and cost.

  Expression whose value is distance between two point

a structured type with two fields, x and y, both of type double-- write an expression whose value is the distance between the two point represented by p1 and p2.

  Computing average net profit per sale of product

Your company bought 250,000 online advertising impressions and made average net profit per sale of product of $5.

  Design and implement a java program

Design and implement a Java program which defines an array of size SIZE, randomly populated with Integer or int values in the range 1 .. MAXRNG and sorts the array in increasing order of its values using QuickSortOpt1 and then by QuickSortOpt2. Consi..

  Calculate the difference between the number and the average

Write a program that will input an array of 10 REAL4 numbers into an array, and that will calculate the average value of the array and the standard deviation.

  Explain usability and accessibility in site design

A description of content to be included in site and how this content will be acquired. Attention should be given to copyright restrictions.

  Basics of hypertext markup language

The basics of Hypertext Markup Language and World Wide Web.

  Write program that inputs integers from keyboard

Write a program that inputs 20 integers from the keyboard and stores them in an array called A. You are then To: Output the numbers in the original input order.

  Scripting language programming in perl

course Scripting Language Programming,  Assignment   -  Perl,  ? Your coding style should conform to general Perl coding conventions. Your scripts should be clean, neat, and well-formatted (e.g. indention). Identifiers should also be properly name..

  Design the swing applet and html test file

You can download sound clips and graphics images from Internet to use in the program. Design the Swing applet named JPartyPlanner and HTML test file to run Swing applet.

  Fortran-77 to sort an array of numbers entered

Write a program in Fortran-77 to sort an array of numbers entered from the keyboard and then using binary search, search for a number in the array.

  Determining smallest possible number people in parade

Group of people are arranging themselves for parade. Determine the smallest possible number people?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd