Ask Java Expert


Home >> Java

Learning Objectives

Consult the online syllabus for the late and academic integrity policies.

1. Complete all of the learning objects of the previous projects.
2. To implement a GUI interface and respond to action events.
3. To implement and use the binary search algorithm.
4. To implement and use the merge sort algorithm.
5. To implement the Comparable interface.

Software Requirements

Your program shall meet these requirements.

1. Student information for students in a course is stored in a text file named gradebook.txt . There is one student record per line, where the format of a student record is:
last-name first-name hw1 hw2 hw2 hw3 exam1 exam2
where:
last-name The student's last name. A contiguous string of characters.
first-name The student's first name. A contiguous string of characters.
hw1-hw4 The student's scores on four homework assignments, may be zeros.
exam1-exam2 The student's scores on two exams, may be zeros.

Sample gradebook.txt

Simpson  Lisa  25  25  25 25  100 100

Flintstone  Fred  15  17  22  18  80 60

Jetson  George  20  21  22  23  70 83

Explosion  Nathan  5  4  3  2  1 0

Muntz Nelson 20 15 10 5 60     70

Terwilliger  Robert  23  21  19  17  80 90

Flanders  Ned  12  14  17  23  85  95

Bouvier Selma 16 16 16 16 16 16

Spuckler Cletus 1 2 3 4 5 6

Wiggum Clancy 6 5 4 3 2    1

Skinner  Seymour  19  23  21  24  78  83

2. When the program starts, it shall read the contents of gradebook.txt and sort the list of students into ascending order.

3. The program shall implement a GUI which permits the user to interact with the gradebook. Watch the Project 3 video lecture for a demonstration of how the GUI works.

4. When the enters a student's last name in the search text field and clicks the Search button, the homework and exam information for the student shall be displayed in the text fields.

5. When the user clicks the Search button and the search text field is empty an error message dialog shall be displayed.

6. When the enters a last name in the search text field and clicks the Search button, if the student is not found because the last name was entered incorrectly an error message dialog shall be displayed.

7. When the user is editing the information for a student and clicks the Save button, the student record shall be updated (these changes will be written to gradebook.txt when the program exits).

8. When no student record is being edited (the homework and exam text fields are empty) and the user clicks the Save button, nothing shall happen.

9. When the user is editing the information for a student and clicks the Clear button, the homework and exam text fields shall be set to empty and the student record shall not be updated.

10. When the user is editing the information for a student and clicks the Exit button, the student record shall be saved before exiting.

11. Whether the user is editing student information or not, when the Exit button is clicked the student records shall be written to gradebook.txt and the program shall terminate.

Software Design
Refer to the UML class diagram in Section 4.10. Your program shall implement this design.

Main Class
A template for Main is included in the zip archive. The Main class shall contain the main() method which shall instantiate an object of the Main class and call run() on that object. Complete the code by reading the comments and implementing the pseudocode.
CourseConstants Class
The complete CourseConstants class is included in the zip archive. This class simply declares some public static constants that are used in other classes.
GradebookReader
A class which reads the gradebook information from gradebook.txt and returns a Roster object which contains the student information. The complete code for this class is provided.
GradebookWriter
A class which writes the gradebook information to gradebook.txt before the program exits. This class inherits from java.io. PrintWriter. This class is very simple. Read the comments and implement the pseudocode.
Roster
Stores the student information in an ArrayList list. Read the comments and implement the pseudocode.

Searcher
This class shall implement one static method int search(ArrayList pList) which searches the list of Roster for a student with the specified last name. Since the roster is sorted into ascending order by last name, you shall implement either the iterative or recursive binary search algorithm. The method returns the index of the student in the list or -1 if the student is not found. Template not provided; use the UML class diagram.
Sorter
A class which implements the quicksort algorithm. All of the method are static and sort(ArrayList pList) is the only public method and calls private quickSort(pList, 0, pList.size() - 1) to sort the list. Template not provided; use the UML class diagram.
Student
The Student class stores the information for one student. Read the comments and implement the pseudocode.

View
The View implements the GUI. Read the comments and implement the pseudocode.

UML Class Diagram
The UML class diagram is provided in the zip archive in UMLet format and as a PNG image. Your program shall implement this design.

2227_UML.jpg

Additional Project Requirements
1. Format your code neatly. Use proper indentation and spacing. Study the examples in the book and the examples the instructor presents in the lectures and posts on the course website.
2. Put a comment header block at the top of each method formatted thusly:
/**
* A brief description of what the method does.
*/
3. Put a comment header block at the top of each source code file formatted thusly:
//********************************************************************************************************
// CLASS: classname (classname.java)
//
// COURSE AND PROJECT INFO
// CSE205 Object Oriented Programming and Data Structures, semester and year
// Project Number: project-number
//
// AUTHOR
// your-name (your-email-addr)
//********************************************************************************************************

Attachment:- Java code.rar

Java, Programming

  • Category:- Java
  • Reference No.:- M92399664
  • Price:- $35

Priced at Now at $35, Verified Solution

Have any Question?


Related Questions in Java

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As