I didn't intend this homework as a case study in how to deal with clients who can't make up their minds, and I apologize for the confusion--but you might be surprised how much like the real world this is sometimes.
Here's what you do.
That's all that is required. For extra learning and practice but no extra credit, make the selection of the musician's name and the presentation of the bio information a nice GUI. I'll show a sample in class, written by a 473 student.
Here is code to show how to specify a file. You will want to make the musician's name the value of a variable; don't send everybody to Bach. The code shown will write all the paragraphs of the Bach bio to the file shown, with HTML tags.
try {
FileWriter rawOut = new FileWriter( "Bach.html" );
PrintWriter out = new PrintWriter( rawOut );
for ( String s : paragraphs ) {
out.println("<p>");
out.println(s);
out.println("</p>");
}
out.close();
}
catch ( IOException error ) {
System.err.println( "Error writing to output file: " +
error );
}
Finally, here is a sample giving the minimum structure of an HTML file:
<html>
<head>
<title>HW 6 Model Solution</title>
</head>
<body>
<h1>Johann Sebastian Bach</h1>
<p>
JS Bach was born.
</p>
<p>
He wrote great music.
</p>
<p>
He had lots of children.
</p>
<p>
He died.
</p>
</body>
</html>