Just had an exam in college. I was asked to write a program to calculate the details of tickets sold at concerts. this was the required output(which i managed to get but without using the inner class which was required so i assume i lost marks for that)
so one part of the exam which i didn't do fully was: "Create a fillList() method that takes a reference variable of type Ticket as a parameter and adds it to the list" how would i go about passing an object of an inner class as a paramitar to a method in the outer class? i managed to manipulate the question and get the required output by not even using the inner class
here is my code
Concert class with inner class Ticket:
Test class:
also had a staticfield class to handle static variables and methods
cheers guys,
D