Java | JSP | JSF Answers

Questions: 3 611

Answers by our Experts: 3 611

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

Create a class Teacher(Tid, Tname, Designation, Salary, Subject). Write a Java program to accept the details of ‘n’ teachers and display the details of teacher who is teaching Java Subject.(Use array of Object)


create a java program will concatenate the basic information of the students given the default variables name.



Hi my name is Dew C. Corpuz My Birhtday is on January 1 1997 I am 24 years old One of the student of BSIT

create a java program will concatenate the basic information of the students given the default variables name

Create a flowchart and a java program of the problem stated as follows. Create

user-defined methods that will perform 4 functionalities of an Automated Teller

Machine(Withdraw, Deposit, Transfer, Balance Check)

1. Withdraw (method name: withdraw)

* Input the amount to be withdrawn. Compute for the remaining balance after

the operation (balance = balance - withdrawn)

2. Deposit (method name: deposit)

* Input the amount to be deposited. Compute for the updated balance after

the operation (balance = balance + deposit)

3. Transfer (method name: transfer)

*Input the account number and the amount to be transferred. Compute for the

updated balance after the operation (balance = balance – moneySent)

4. Balance Check (method name: balanceCheck)

* Display the remaining balance.


There are two lists of numbers. Create a resultant list whose elements are the product of

the elements of the two lists.

Example: List A List B List C

21 30 630

50 10 500

.... .... ....


Write a Java program using a one-dimensional array that accepts as input an integer

value asking for the number of elements for each list. This will be used to generate random

numbers (5 to 69) for the one-dimensional arrays (List A and List B). The program will

compute for the product and store it in another array (List C). Display the result similar to

the Example above.


Create class named PIZZA. Data field include a string for toppings( such as pepperoni), an integer for diameter in inches(such as 12), and a double for price(such as 23.70).

Include methods to get and set values for each of these fields. 


B. Create an application name TESTPizza the intantiates one demonstrate the use of Pizza set and get methods.

Save the application TestPizza.java




import java.util.*;



class App {


public static void main(String[] args) {

Scanner in = new Scanner(System.in);

System.out.println("Enter a String: ");

String line = in.nextLine();

boolean space = true;

boolean first = false;

for (int i = 0; i < line.length(); i++) {

if (line.substring(i, i + 1).equals(" ")) {

System.out.print(line.substring(i, i + 1));

space = !space;

first = false;

} else if (space) {

if (!first) {

System.out.print(line.substring(i, i + 1) + ".");

first = true;

}

} else {

System.out.print(line.substring(i, i + 1));

}

}

System.out.println();

in.close();

}

}

Do the coding without using boolean, array and split


Create a java program that generates elements (randomly from 10 – 75) of a 2-dimensional array


(5x5) using the Random Class then perform the following:


1) Output the array elements


2) Output the sum of prime numbers in the array


3) Output the elements in the main diagonal.


4) Output the sum of the elements below the diagonal.


5) Output the sum of the elements above the diagonal.


6) Output the odd numbers below the diagonal.


7) Output the even numbers above the diagonal.


Write a program to take a String as input then display the words in spaced format.

Example:

Enter a String

Asia is the largest continent

Asia

\t is

\t \t the

\t \t \t largest

\t \t \t \t continent


You have to generate electricity bill for a customer with the details as give below: Customer ID, Customer Name, Customer Address, Contact No, Units Consumed, Total payable amount. Following are the norms to calculate the unit amount:



a) for initial 100 units it will cost 6 rupees per unit


b) for next 100 units it will cost 8 rupees per unit


c) for next all units it will cost 10 rupees per unit

LATEST TUTORIALS
APPROVED BY CLIENTS