Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

perry ellis

Greenhorn
+ Follow
since May 30, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by perry ellis

No I solved this one... I have the program, Just in case you wanna have a look, Wot I did.. here it is

public class Circles
{
public static void main(String[] args)
{
double far = 0, cel = 0;
double[] rad = new double[5];

if(args.length < 5)
{
System.out.println("Enter 5 arguments.");
System.exit(0);
}
try
{
for(int i = 0;i<5;i++)
{
rad[i] = Double.parseDouble(args[i]);
}
for (int i = 0; i<5; i++)
{
System.out.println("Radius of "+(i+1)+"th circle : "+rad[i]);
System.out.println("Circumference of "+(i+1)+"th circle : "+(long)(2.0*Math.PI*rad[i]*100)/100.0);
System.out.println("Area of "+(i+1)+"th circle : "+(long)(Math.PI*rad[i]*rad[i]*100)/100.0);
System.out.println();
}

}
catch (NumberFormatException nfe)
{
System.out.println("Enter a valid number");
}
}
}


It gets compiled and runs fine, takes 5 arguments
javac Circles.java
java Circles 3 4 5 6 7 8


Tell me if you think, its wrong ?
15 years ago
Yes very well
Had circulated assignment in my team and had created a shared folder on my machine (VSS...LOL)
The assignment was done in 1 hr
15 years ago
Thnx for all the prompt responses, I have sent my assignment already 
But itz good to know, ppl responded to this thread, I wsn�t expecting any�

Cheerios�

Perry ( it�s a sweet name though not mine)
15 years ago
MBA is about learning art of delegation
So stop the chit chat and start solving the questions
15 years ago
Hi Frendz

I am posting a Java assignment. I am doing MBA(IT) from Symbiosis and I have to submit an assignment on Thursday. Im trying few questions, If anyone has solution to any of the programs, Please forward the same.

Here is the list of questions

Assignment for Java



Note: 1. Solve any 10 programmes

2. Each Programme carries 10 marks

3. The weight of these programmes is 40% (other 60% is for Online assignment submission)

Q. 1. Write a program that converts a decimal number to Roman number. Decimal Number is accepted as command line input at the time of execution

Q. 2. Write a program that prints prime numbers between 1 to n. Number n should be accepted as command line input.

Q. 3. Write a program that prints first n Fibonacci numbers. Number n should be accepted as command line input. Any Fibonacci number is calculated as, sum of its previous 2 numbers,

e.g. 0 , 1 , 1 , 2, 3 , 5 , 8 , 13 , ����..

First 2 Fibonacci numbers are 0 and 1.

Q. 4. Write a program to print out multiplication tables from 9 to 17 using (I) for loops (II) while loops (III) do loops.

Q. 5. Write a program to print the following triangle of numbers.

1

1 2

1 2 3

1 2 3 4

1 2 3 4 5



Q. 6. Write a program to convert Fahrenheit temperature to the Centigrade equivalent. Fahrenheit temperature should be accepted from the user.

Centigrade = (Fahrenheit � 32) * 5.0/9.0

Q . 7. Define a class called Circle with the attributes radius, circumference, and area of the circle. Write a program to display all attributes of the circle for 5 Circles. Radius for all 5 circles should be accepted as command line input at the beginning. e.g. java Circlejava 5 10 12 25 36

Q . 8. Write a program to find the Factorial of a number using Recursion. Factorial can be defined as Factorial(n) = 1 * 2 * 3 �.* (n-1) * n.

Q . 9. Write a program to get the input values Principal, rate of interest and number of Years from the keyboard and find the simple interest.

Q. 10. Write a program to create an applet with yellow back ground and display the Message WELCOME TO THE JAVA WORLD. Write its HTML document also.

Q. 11. Write a java program to create a Frame with three buttons Morning, Afternoon and Evening. When we click Morning button, the message �Good Morning to you� must be displayed. Similar messages must be displayed for the other buttons also.

Q. 12. Write a Java program to create a List box with some colors in the items. When the color is selected, the background color must change accordingly. Write a program which creates and displays the details in the List box on the window.

Q13. Write a program to show demonstration of CardLayout and Flowlayout. Create 2 panel, Top & Main. Top panel contains 3 buttons Button 1 , Button 2 & Button 3 in Flowlayout. Main panel contains 3 panels First Panel, Second Panel and Third Panel. On selection of any panel display appropriate message. Here Applet is to be used by implementing ActionListener.

Q . 14. Write a Java program to create a Frame which responds to the mouse click. For each event with mouse ( such as mouse up, mouse down etc.) the corresponding message must be displayed.

Q . 15 . Write a program to explain the multithreading with the use of multiplication tables. Three threads must be defined. Each one must create one multiplication table, they are 5 table, 7 table and 13 table. And assign priority 1 to 5 Table, priority 5 to 7 Table and priority 8 to 13 Table. And then run the threads.

Q . 16 . Write a Java program to create simple Calculator for 4 basic Math operations, Addition, Subtraction, Multiplication and Division. In the window there are four radio buttons called Add, Sub, Mul and Div at the Top. This group is called Operation. There are two textfield objects to input first and second number.We must type the numbers and select one of the operations. When we click the perform button, the result is displayed. For example if the first number is 10 and second number is 72 And operation selected is Mul then the result is displayed as,
The result is 720.

Thnks & Regards

Perry
15 years ago