When i change the outer wrapper to class public TicketMachine the class diagram become red mesh. After i try to…