1 how would you output tabbed text from a java program


1. How would you output tabbed text from a Java program? Please write a simple program that demonstrates that. Make sure to compile and test your code before posting it here.

2. What methods from JOptionPane would you use to get input and display result? Please write a simple program that gets an integer number from the user and then displays that number multiplied by 2. Make sure you compile and test your code before posting it here.
____________
Please do some search and see what is the specification of the showInputDialog() method of the JOptionPane class.

What is the type of the parameter it accepts? What is the type of the values it returns?

3. Let's as an exercise, write here a program that assigns 5 extra points to students who answer correctly bonus question X and 12 extra points to students who answer correctly both bonus questions X and Y.

4. Write a program that reverses a number, e.g., if the number is 3175, the result should be 5713.

5. What are instance variables of a class?

Please give a simple example of a class that implements a name consisting of a first and a last name.

6. Why is object-oriented programming so widely used in development?

Solution Preview :

Prepared by a verified Expert
JAVA Programming: 1 how would you output tabbed text from a java program
Reference No:- TGS01235165

Now Priced at $50 (50% Discount)

Recommended (93%)

Rated (4.5/5)

A

Anonymous user

2/11/2016 7:50:26 AM

This is an assignment of Java programming. You have to perform the following tasks of Java. Q1. Explain how would you output tabbed text from the Java program? Provide a simple program which illustrates that. Ensure to compile and test your code before submitting. Q2. Describe methods from JOptionPane would you employ to obtain input and display result? Provide a simple program which gets an integer number from the user and then shows that number multiplied by 2. Ensure you compile and test your code before submitting. Please perform some search and observe what is the specification of the showInputDialog() method of the JOptionPane class. What kind of the parameter it accepts? Describe the kind of values it returns?