Lab 1 PDF
Lab 1 PDF
Lab 1 PDF
Lab 1:
1
2
2. Inside the
class, create one
void method
named display.
The method will
print the name
of the image.
Example “This is
a Car”
3. Write one
application
named
Main.java. the
Main.java
consists main
method. Create
objects of four
classes and
invoke display
method in Main
method.
package firstanalysis;
import java.util.Random;
2
3
/**
*
* @author msa
*/
public class MyFirstAnalysis {
Random
for(intgenerateRandom = new Random();
i =0; i<10; i++)
{
inputData[i] = generateRandom.nextInt(100);
}
return inputData;
4. Based on the UML class given below, write the java implementation class. Then, write
MyApp.java given below. Compile and run MyApp.
3
4
MyApp.java
4
5
5
6
7. Add the related source code for converting farenheit to celcius into GuiTemperature class
below. Compile and run GuiTemperature.