HW8 -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ---------------------------------------------------------------------HW#8 SPECS CS108, SPRING 2009 ---------------------------------------------------------------------Using the Week 13 lecture notes for "Bubble Sort" as a hint, create a program that meets the following specs: * Asks the user to input info For each music CD, the user and an ID number (e.g., the who is hiring you to create for 5 music CDs. inputs the production year ID number used by a radio station or library software for them). * Outputs the music CD info, in the following order: Decreasing years. Within each year, increasing ID numbers. (You can assume that the user's ID numbers are all different.) I.e., create a Bubble Sort that sorts on TWO data fields, instead of one. The questions, and program output, should EXACTLY match the format shown in the Sample Run below. ---------------------------------------------------------------------SAMPLE RUN: =========== rohan% java HW8 CD#1 CD#1 CD#2 CD#2 CD#3 CD#3 CD#4 CD#4 CD#5 CD#5 - Input Input Input Input Input Input Input Input Input Input year: ID#: year: ID#: year: ID#: year: ID#: year: ID#: 2005 999 2008 900 2005 300 2005 350 2008 110 Your CD shelf listing is: CD#5 CD#2 CD#3 CD#4 CD#1 - 2008 2008 2005 2005 2005 - 110 900 300 350 999 <the 2005, etc., is user input, not program output ----------------------------------------------------------------------End Of File ...
View Full Document

Page1 / 2

HW8 -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online