An interface describes a capability without requiring its implementations to share a parent class. A caller that needs a cost can depend on Billable while fixed and premium jobs store their own state. Interface methods implemented by a class remain public. Private fields let each implementation protect its own rules.
Packages organize names and establish an access boundary. Public members can cross that boundary; package-private members stay within it. Private access belongs to the enclosing top-level class and its nested classes. Protected also permits same-package access and constrained subclass access across packages. Importing a name never grants access. This workspace compiles one Solution file, so the last tasks calculate naming and access decisions under stated assumptions. They don't pretend to build a directory of source files. The runnable object tasks use nested types to preserve the same contracts.