Other Programming & Computer Science Answers

Questions: 1 727

Answers by our Experts: 1 357

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

Design a class named MyInteger. The class contains:
• An int data field named value that stores the int value represented by this object.
• A constructor that creates a MyInteger object for the specified int value.
• A get method that returns the int value.
• The methods isEven(), isOdd(), and isPrime() that return true if the value in this object is even,
odd, or prime, respectively.
• The static methods isEven(int), isOdd(int), and isPrime(int) that return true if the specified
value is even, odd, or prime, respectively.
• The static methods isEven(MyInteger), isOdd(MyInteger), and isPrime(MyInteger) that return
true if the specified value is even, odd, or prime, respectively.
• The methods equals(int) and equals(MyInteger) that return true if the value in this object is
equal to the specified value.
• A static method parseInt(char[]) that converts an array of numeric characters to an int value.
• A static method parseInt(String) that converts a string into an int value.
Draw the UML diagram for the class a
Given a square matrix with the elements 0 or 1, write a program to find a maximum square
submatrix whose elements are all 1s. Your program should prompt the user to enter the number
of rows in the matrix. The program then displays the location of the first element in the
maximum square submatrix and the number of the rows in the submatrix. Here is a sample run:
Enter the number of rows in the matrix: 5
Enter the matrix row by row:
10101
11101
10111
10111
10111
The maximum square submatrix is at (2, 2) with size 3
Your program should implement and use the following method to find the maxi- mum square
submatrix:
public static int[] findLargestBlock(int[][] m)
The return value is an array that consists of three values. The first two values are the row and
column indices for the first element in the submatrix, and the third value is the number of the
rows in the submatrix.
Create database of library (book_id,book_name,author,book_status,date_of_issue,date_of_return,reference or leading book issued).
(Hint:book status mean books of leading and reference (len/ref).
i) Create a suitable primary key and enter at least five records with difference names.
Write Queries
ii) Display list of books which are not for leading.
iii) Find list of books issued.
iv) Display list of books issued between to dates.(issue date,return date).
v) Display list of books with same author.
You are required to develop a computer program to calculate and display output of the interest-bearing investment. This investment is all interest bearing and compounded quarterly (the interest calculated and added back to the balance four times a year), that extends for three years.

The program will allow users to input the rate for the investment and show to the users how that investment would progress over three years.

The output should be in a table showing the investment’s history – starting amount, interest and ending amount – for each quarter of each year. It should also show the total interest earned in each year as well as over the three years.

The input will consist of an interest rate to be analysed. Anything less than 5 percent or greater than 20 percent will be deemed an unreasonable rate and should be rejected.

The interest is calculated by multiplying the current balance, rate and time period which is one quarter of a year as in this case. A new balance is calculated by adding that interest
Consider the relations
EMPLOYEE(emp#, name)
ASSIGNED_TO(project#, emp#)
PROJECT(project#, project_name, chief)
Express the following queries in Relational Algebra
(i) Get details of employee working on both comp354 and comp345 project numbers.
(ii)Find the employee number of employee who do not work on project comp678.



pleaz send me this qyestion anwer.
Perform the following DML operations on the table:
1. Insert values for the table CUSTOMERS with fields – ID, name, age, address and salary and insert records in the table given below:
+----+----------+-----+-----------+----------+
| ID | NAME | AGE | ADDRESS | SALARY |
+----+----------+-----+-----------+----------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
| 2 | Khilan | 25 | Delhi | 1500.00 |
| 3 | kaushik | 23 | Kota | 2000.00 |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
| 6 | Komal | 22 | MP | 4500.00 |
| 7 | Muffy | 24 | Indore | 10000.00 |
+----+----------+-----+-----------+----------+
2. Based on the customer table given above update the salary to 20000 whose salary is less than that.
Based on the customer table given above Fetch ID,
3. Name and Salary fields from the CUSTOMERS table for a customer with name Hardik.
Perform the following DML operations on the table:
1. Insert values for the table CUSTOMERS with fields – ID, name, age, address and salary and insert records in the table given below:
+----+----------+-----+-----------+----------+
| ID | NAME | AGE | ADDRESS | SALARY |
+----+----------+-----+-----------+----------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
| 2 | Khilan | 25 | Delhi | 1500.00 |
| 3 | kaushik | 23 | Kota | 2000.00 |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
| 6 | Komal | 22 | MP | 4500.00 |
| 7 | Muffy | 24 | Indore | 10000.00 |
+----+----------+-----+-----------+----------+
2. Based on the customer table given above update the salary to 20000 whose salary is less than that.
Based on the customer table given above Fetch ID,
3. Name and Salary fields from the CUSTOMERS table for a customer with name Hardik.
Consider the relations
EMPLOYEE(emp#, name)
ASSIGNED_TO(project#, emp#)
PROJECT(project#, project_name, chief)
Express the following queries in Relational Algebra
(i) Get details of employee working on both comp354 and comp345 project numbers.
(ii)Find the employee number of employee who do not work on project comp678
Design an algorithm to accept income from the user; compute the income tax to be
paid and display on the screen. Income tax is based on the following table available
at this link: http://iras.gov.sg/irasHome/page04.aspx?id=1190 (Note: Choose
Resident Individuals)
A transaction record on a sales commission file contains the retail price of an item
sold, a transaction code that indicates the sales commission category to which an
item can belong, and the employee number of the person who sold the item. The
transaction code can contain the values A, B or C, which indicate that the
percentage commission will be 6%, 8% or 10% respectively. Construct an algorithm
that will read a record on the file, calculate the commission owing for that record, and print the retail price, commission and employee number
LATEST TUTORIALS
APPROVED BY CLIENTS