Plain text version | Style: Default, Black and White, Bath

University of Bath Logo
Dr Marina De Vos
Department of Computer Science
Wednesday, 22-Nov-2017 05:21:04 GMT

Programming I (CM10134 - CM50147): Lab 10

Carry out the following exercises.You will need to show all your code.


  • Exercises 12.23, 12.28, 12.30, 12.31 (11.27) and 12.32 (11.28) from the BlueJ book.


  • The availability of computers with string manipulation capabilities has resulted in some rather interesting approaches to analyzing the writing of great authors. Much attention has been focused on whether William Shakespeare ever lived. Some scholars believe there is substantial evidence indicating that Christopher Marlowe or other authors actually penned the masterpieces attributed to Shakespeare. Researchers have used computers to find similarities in the writings of these two authors. This exercise examines a method for analyzing texts with a computer.
    Write an application that reads several lines of text from the keyboard and prints a table indicating the number of occurrences of each letter of the alphabet in the text. Furthermore, display the number of lines and words the text contained.
    Ensure your code is robust.