Java -Fundamentals Objects and Classes - Exercise- 04. Articles 2.0
Здравейте, може ли малко помощ със задачата Articles 2.0, и по-точно как да принтирам изхода в искания формат...не ми идват идеи блокирах
Change the program, so you can store a list of articles. You will not need the methods any more (except the ToString method). On the first line, you will get a number n. On the next n lines, you will get some articles in the same format as the previous task ("{title}, {content}, {author}"). Finally, you will get one of the three inputs: "title", "content", "author". You need to order the articles alphabetically based on the command and print them sorted by the given criteria
2
Science, planets, Bill
Article, content, Johnny
title Article - content: Johnny
Science - planets: Bill