14. Write a program by using a class 'Picnic without any data members but having
only functions as per the soecifications given below:
class name : Picnic
void display 10: To print venue, plce and reporting time.
void display 2: To print number of students, name of the teacher accompanying
and bus number
Write a main class to create an object of the class 'Picnic' and call the functions
display10) and display20).
In JAVA
WITHOUT ARRAY
Answers
Answered by
40
Answer:
the collapse of 18 Spencer five reason during activities investigated the overcurrent concert was connected to the diameter
Answered by
48
Answer:
class Picnic
{
public void display1() {
System.out.println("Venue: Botanical Garden");
System.out.println("Place: MG Road");
System.out.println("Reporting Time: 9:00 AM");
}
public void display2() {
System.out.println("Number of Students: 50");
System.out.println("Name of teacher: Mr. Nagabhushan");
System.out.println("Bus Number: KA 01 1234");
}
public static void main(String args[]) {
Picnic obj = new Picnic();
obj.display1();
obj.display2();
}
}
Explanation:
Similar questions