class PreDefinedSection implements Section {

	private final String title;

	private final List<Section> subSections = new ArrayList<>();

	public PreDefinedSection(String title) {
		this.title = title;
	}

	public PreDefinedSection addSection(Section section) {
		this.subSections.add(section);
		return this;
	}

	@Override
	public void write(PrintWriter writer) throws IOException {<FILL_FUNCTION_BODY>}

	public boolean isEmpty() {
		return this.subSections.isEmpty();
	}

	/**
	 * Resolve the sections to render based on the current registered sections.
	 * @param sections the registered sections
	 * @return the sections to render
	 */
	protected List<Section> resolveSubSections(List<Section> sections) {
		return sections;
	}

}

		if (!isEmpty()) {
			writer.println("# " + this.title);
			writer.println("");
			for (Section section : resolveSubSections(this.subSections)) {
				section.write(writer);
			}
		}
	
<no_super_class>