COSC2325 Practice Exam 1

COSC2325 Practice Exam 1 - Sample Test Questions Exam #1 1)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sample Test Questions Exam #1 1) Define list, declaration, signature, instance, class, object, Abstract Data Type (ADT), source code file, interface, megabyte, gigabyte, terabyte, petabyte, yottabyte, zettabyte, method, attribute, data member, static class method 2) What is the difference between an accessor method and a mutator method of a class? 3) Describe what method(s) is/are implemented for the Comparable interface. 4. Create a class called Student to hold a student id(integer), a student name (string), a gpa (double), and credit hours (integer). Write a default constructor, 2 accessors, 2 mutators, and the private data members that would most likely be needed. Make the class implement the Comparable interface. Be sure to provide the toString() method. 5) USING your class Student, write a main method that does each of the following. i) create a Student, s3, with id-700 name-Joe gpa-3.5 hours-100 ii) create a Student, s2 with id-800 name-Mary gpa-3.25 hours-30 iii) print both s3 and s2 to the screen. iv) Change s3's name to Joe Galloway.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/29/2008 for the course COSC 2325 taught by Professor Baker during the Spring '08 term at St. Edwards.

Page1 / 4

COSC2325 Practice Exam 1 - Sample Test Questions Exam #1 1)...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online