Reference no: EM132109211
Programming Project: Course Grades
In a course, a teacher gives the following tests and assignments:
A lab activity that is observed by the teacher and assigned a numeric score.
A pass/fail exam that has 10 questions. The minimum passing score is 70.
An essay that is assigned a numeric score.
A final exam that has 50 questions.
Write a class named CourseGrades that implements the following interface:
public interface Analyzable
{
double getAverage();
GradedActivity getHighest();
GradedActivity getLowest();
}
The class should have a GradedActivity array named grades as a field. The array should have four elements, one for each of the assignments previously described. The class should have the following methods:
setLab: This method should accept a GradedActivity object as its argument. This object should already hold the student's score for the lab activity. Element 0 of the grades field should reference this object.
setPassFailExam: This method should accept a PassFailExam object as its argument. This object should already hold the student's score for the pass/fail exam. Element 1 of the grades field should reference this object.
setEssay: This method should accept an Essay object as its argument. The Essay class extends the GradedActivity class presented in this chapter. The Essay class should determine the grade a student receives for an essay. The student's essay score can be up to 100 and is determined in the following manner: 1) Grammar: 30 points, 2) Spelling: 20 points, 3) Correct length: 20 points, and Content: 30 points. Element 2 of the grades field should reference this object.
setFanalExam: This method should accept a FinalExam object as tis argument. This object should already hold the student's score for the final exam. Element 3 of the grades field should reference this object.
toString: This method should return a string that contains the numeric scores and grades for each element in the grades array.
Demonstrate the class with a driver program.
Sample Output:
Lab Score: 85.0 Grade: B
Pass/Fail Exam Score: 85.0 Grade: P
Essay Score: 80.0 Grade: B
Final Exam Score: 80.0 Grade: B
Average score: 82.5
Highest score: 85.0
Lowest score: 80.0
Press any key to continue . . .
Write a program that prompts the user to input a sequence
: A null-return function, outVowels, that outputs a list of each vowel and the number of times that vowel appeared in the input sequence.
|
Create a method that determines a score for each
: Using the helper class and text files described above, load the 20 movie names and the movie ratings from 30 people into two arrays in memory.
|
Code a program with functions to search and sort an array
: Code a program with functions to search and sort an array, along with a print menu function and a dispatch function.
|
What is a programming language
: Answer the following Question : What is a programming language?
|
Demonstrate the class with a driver program
: In a course, a teacher gives the following tests and assignments: A lab activity that is observed by the teacher and assigned a numeric score.
|
Write an m-file in matlab which can perform a word search
: Convey how the program was developed, what issues were encountered, whether the program was successful (and if not, why not), etc.
|
Create a patron class for the library
: The class will have a user's name. library card number, and library fees (if owed). Have functions that access this data, as well as a function to set the fee.
|
Print out an error message that contains the first non-digit
: This function accepts a C-string parameter (null-terminated char array) and return true if the C-string contains only digits.
|
Write a public static method named static long tribonacci
: Write a public static method named static long tribonacci(int n, long a, long b, long c)
|