O'Reilly logo

Introducing Data Structures with Java by David Cousins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

14

Case Study 1—A Student Grades Program

14.1 INTRODUCTION

The purpose of this case study is to review, apply and extend the contents of Chapter 6, which deals with array searching. It also illustrates the process of reading data from a file.

14.2 THE APPLICATION

A tutor keeps a data file holding a list of the names of all students in a group together with their semester grades for the course Data Structures. Grades are in the form of capital letters, A–C, followed possibly by a ‘+’ or ‘–’ sign, such as B+ or C–.

The following operations are required:

  1. to look up a given student’s grade;
  2. to display the names of all students with a given grade, and display the total number of students having that grade;
  3. to display the entire set of data.

The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required