Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

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

8. Develop a program by designing a class to represent a bank account. Include the 

  following members:

Data Members:

Name of the Depositor

Account Number

Type of account

Balance

Methods:

getdetails( )   ---To assign initial values

deposit( )  ---To deposit an amount

withdraw( ) ---To withdraw an amount after checking balance

display( )--- To display the name and balance.



Write a java program to calculate the income of sales person per week. 

Itemcode

Item Name

Unit Price

Quantity


121

Shampoo

250.45

3


131

Soap

102.16

2


141

Talcum powder

98.23

3


145

Oxford Dictionary

500.24

4



6. Write a java application that inputs an integer containing only 0‘s and 1’s (i.e. a binary integer) and prints its decimal equivalent.



Write a Java application that ask the user to enter two integers, and prints their sum, product, difference and quotient (division).

[Use Scanner class  present in java.util package and nextInt () method to read input].

Write a Java application that inputs from the user the radius of a circle as an integer and prints the circle's diameter, circumference and area using floating point value 3.1459 for pi. You may also use constant Math.PI for the value of pi. Class Math defined in package java.lang.

[Note: Use Scanner class present in java.util package and nextInt () method to red input].


3. Write a Java Application that inputs from the user temperature in Fahrenheit as an float and converts in to its equivalent Celsius temperature and print the result.(Formula:c=(f-32)*5/9)

[Note: Use Scanner class present in java.util package and nextFloat () method to red input].

    


Create a Spending application to help examine the spending patterns of a user. The application should prompt the user for the amount spent last month on food, clothing, entertainment, and rent, and then displays a table showing the percentage of expenditures in each category.



Compute the Average per subject and Gen. Ave of the ff students based on the given Grading criteria


Criteria : Attendance, Quiz, Examination, Assignment

Subject: Math, English, Computer, History, P.E

Students: Juan and Maria


What operation does the Selection Sort use to move numbers from the unsorted section to the sorted section of the list


Write a function to sort array elements using Selection sort in Descending order .also Compute the best case and worst case time complexity of selection sort.


Write java code to print following diamond patterns. This program must take number of lines from user. If even number is entered than program must ask again user to enter odd number.


Suppose that the input is:

58 23 46 75 98 150 12 176 145 -999

What is the output of the following program?

import java.util.*;

public class FindTheOutput

{

static Scanner console = new Scanner(System.in);

public static void main(String[] args)

{

int num;

num = console.nextInt();

while (num != -999)

{

System.out.print(num % 25 + " ");

num = console.nextInt();

}

System.out.println();

}

}


Correct the program so that it works properly.


import java.util.*;

public class Main {

static Scanner console = new Scanner(System.in);

public static void main(String[] args) {

char response;

double num1;

double num2;

System.out.println("This program adds two numbers.");

System.out.print("Would you like to run the program: (Y/y) ");

response = console.next().charAt(0);

System.out.println();

while (response == 'Y' && response == 'y')

{

System.out.print("Enter two numbers: ");

num1 = console.nextInt();

num2 = console.nextInt();

System.out.println();

System.out.printf("%.2f + %.2f = %.2f %n", num1, num2, (num1 - num2));

System.out.print("Would you like to add again: (Y/y) ");

response = console.next().charAt(0);

System.out.println();

}

}

}


LATEST TUTORIALS
APPROVED BY CLIENTS