Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

4. The Litsemba Life Insurance company computes annual policy premiums based on the age the customer turns in the calendar year. The premium is computed by taking the decade of the customer's age, adding 15 to it, and multiplying by 20. Write a Java application that prompts the user for the current year and birth year. Pass both to method that calculates and returns the premium amount and display the returned amount. Application should be saved as Insurance.java . Note: the customer age should not be more than 59 years. [10 Marks]


Implement a class Matrix to create matrices of 2x2, 3x3 and 4x4 with the following private

datamembers:

1. int **matrix – a double pointer of type integer to create a 2D array (matrix)

2. int row – an integer to store the rows in the matrix

3. int col – an integer to store the columns in the matrix

The class shall have the following public member functions:

1. Matrix Add(Matrix m) – adds the calling object matrix with the one passed as an argument and returns a resultant matrix

2. Matrix Subtract(Matrix m) – subtracts the calling object matrix with the one passed as an argument and returns a resultant matrix

3. Matrix Multiply(Matrix m) – multiplies the calling object matrix with the one passed as an argument and returns a resultant matrix

4. int FindkSmallest(int k) – a function that finds the kth smallest element in the matrix. If k is 1, return the smallest element. If k is 2 return the second smallest element and so on.

5. Matrix merge(Matrix m) - a function to merge two matrices.


Write a program to print the following,


Sample Input1

after

4

a b c d

f e f g

t e r r

a b i j


Sample Output1

[(0, 0), (1, 0), (2, 0), (2, 1), (2, 2)]


(using dev c++) Create a program that has class definitions for Item, Customer and Sales. The main simply


creates object object of each class and test its member functions. Modify the main program such that it


provides a menu driven interface where user can create objects of Item, Customer and a complete a


sales transaction with the sales object. The program should also have an option for display the records of


items, customers and sales. To make your program more useful, include file handling such that when


objects are created for Items, Customers and Transaction, the user will be prompted to save the record


on the file or not.

Program


Write a program to print the following, Given a word W and pattern P, you need to check whether the pattern matches the given word.The word will only contain letters(can be Uppercase and Lowercase). The pattern can contain letters, ? and *.

? : Can be matched with any single letter.
* : Can be matched with any sequence of letters (including an empty sequence).


If the pattern matches with the given word, print True else False.


Sample Input1

3

Hello *l?

Hell He?ll

Hell ?*


Sample Output1

True

False

True




  1. What is the Difference between MOV AH, 2 and MOV AH, 1
  2. What is the Purpose of "LEA" and MOV AH, 9

Create an Assembly Language Program with the following arithmetic operations.

a.) 2+2-3+1*2-2 = 2

b.) 5-1*2+1-7*2 = 4


USING POLYMORPHISM

-Create a complex program that applies control structure, iterative, array . 



A triangular number is defined as m(m + 1)/2 for m = 1, 2, …, and so on. Therefore, the first few numbers are 1, 3, 6, 10, … . Write a function with the following header that returns a triangular number:

int getTriangularNumber (int n)

Write a test program that uses this function to display the first 75 triangular numbers with 5 numbers on each line.



Create a Java program in jdoodle that will determine if the score is Passed/Failed. (10 is the passive score out of 20)

  • Will not accept special characters.
  • will not accept blank score.
  • will not accept if it's greater than 20.
  • will not accept if it's lesser than 1.
LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS