* * This is a dBase III+ command file to query the 'College of YES' * database and generate some summary statistics. * * Gerry Santoro -- LA-482 -- Section 2 -- Project 4 * * place database in use * use classic * * clear screen * clear * * count total number of students and save in variable * count to c1 * * count number of students with and without scholarships * count for has_bucks to c2 count for .not. has_bucks to c3 * * now calculate average age of students in each major * average how_old for major = 'voice' to a1 average how_old for major = 'guitar' to a2 average how_old for major = 'keyboards' to a3 average how_old for major = 'percussion' to a4 average how_old for major = 'bass' to a5 * * now count number of students in each major * count for major = 'voice' to m1 count for major = 'guitar' to m2 count for major = 'keyboards' to m3 count for major = 'percussion' to m4 count for major = 'bass' to m5 * * now clear screen and display report * clear ? " " ? " The YES Union College" ? " " ? " (With present and past band members)" ? " " ? "Total number of students: ", c1 ? "Total number of students with scholarship: ", c2 ? "Total number of students without scholarship: ", c3 ? " " ? "Average age of voice majors: ", a1 ? "Average age of guitar majors: ", a2 ? "Average age of keyboard majors: ", a3 ? "Average age of percussion majors: ", a4 ? "Average age of bass majors: ", a5 ? " " ? "Number of voice majors: ", m1 ? "Number of guitar majors: ", m2 ? "Number of keyboard majors: ", m3 ? "Number of percussion majors: ", m4 ? "Number of bass majors: ", m5 * * end of program *