Ask Question, Ask an Expert


Ask Java Expert

Home >> Java

problem 1: prepare a Java program which computes and prints the simple interest by using the formula:

Simple Interest = PNR / 100

Input values P, N, R should be accepted as command line input as shown below.

ex:  java SimpleInterest  5  10  15

problem 2: prepare a program to find out sum of digits of a given number.

problem 3: The numbers in the given sequence are termed as the Fibonacci numbers.

0, 1, 1, 2, 3, 5, 8, 13,…………..

prepare a program by using do…..while loop to compute and print the first m Fibonacci numbers.

problem 4: prepare a program which converts a decimal number to Roman number. Decimal Number is accepted as command line input at the time of execution.

problem 5: prepare a program which prints prime numbers between 1 to n. Number n must be accepted as command line input.

problem 6: prepare a program to print the given output by using the for loop.

2  2
3  3   3
4  4   4   4
5  5   5   5   5

problem 7: prepare a Java program which accepts the radius of a circle and displays the options as follows:

a) Find out the diameter of a circle. (2* radius)
b) Find out the area of circle. (Π * radius * radius)
c) Find out the circumference of a circle. (2 * Π * radius)
d) Exit.

Use case statement to implement each option and display the corresponding output.

problem 8: Define a class called fruit with the given attributes:

a) Name of the fruit.
b) Single fruit or bunch fruit.
c) Price.

Define an appropriate constructor and displayFruit() method which displays values of all the attributes. prepare a program which creates 2 objects of fruit class and display their attributes.

Java, Programming

  • Category:- Java
  • Reference No.:- M93127

Have any Question? 

Related Questions in Java

Assignment multi-threaded programming in java using

Assignment: Multi-threaded Programming in Java Using Locks Objectives: To practice programming cooperating, synchronized multiple threads of execution. Description: In this programming assignment you will simulate the de ...

Write java program with eclipsinstructionswrite a program

Write java program with Eclips INSTRUCTIONS Write a program that will help a student practice basic math (addition, subtraction, multiplication, and division). Display a menu the student can select from. The student will ...

Design your own java class that includes at least 3 data

Design your own Java Class that includes at least 3 data fields, 2 constructors and 4 methods. When designing your class, pick an object that you are familiar with and make it your own, realistic, yet simple design with ...

Assignmentexercise1write a java class that asks the user to

Assignment Exercise#1: Write a java class that asks the user to enter three numbers N1, N2, N3 , obtains the numbers, then calculates and displays the largest number Max followed by the text "is the largest" and the smal ...

Write a java application that allows a user to enter

Write a Java application that allows a user to enter numbers into an array and then process them. Enter the number of elements and the value of each element; Your application will process the data entered and will displa ...

Programming assignmentyou to write a class named

Programming Assignment You to write a class named WeaklyCalendar. This class must be in a package named pa4. Note that the description of a programming assignment is not a linear narrative and often requires multiple rea ...

Java application - distancecalculatorcreate a java

Java Application - DistanceCalculator Create a Java application named to solve the following problem. An application is needed to allow a user to enter two cities and display the distances between ...

Write a java program and pseudocode to read a number up to

Write a java program and pseudocode to read a number up to 15 digits long or a date (dd/mm/yyyy). The program should distinguish numbers from input date, and prints them in alphabetic spelling form. Example: for input 23 ...

Javawrite a program that finds and prints all the solutions

**java**write a program that finds and prints all the solutions to the N queens problem for a given N. At the end of your program, print how many solutions were found. What is the N-Queens problem, you ask? 1) Google it. ...

Assignment introduction to programming using java1 write a

Assignment: Introduction to Programming Using Java 1. Write a program that uses one of the Map classes to implement a contact list. Contact information should include first name, last name, a phone number and an email ad ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro