KNOW:
BE ABLE TO:
Sample Exam Question:
A program defines a class Song:
class Song{ String title; String artist; int price; Song(String title, String artist, int price){ this.title = title; this.artist = artist; this.price = price; } }Write a method
increasePrice
that consumes a LinkedList<Song> and produces a
LinkedList<Song> in which the price of each song is increased by $1. Do this without
modifying the songs in the original list.