Stores the student information in an arraylist

Assignment Help C/C++ Programming
Reference no: EM131028525

1 Submission Instructions

Create a folder named <asuriteid> where asuriteid is your ASURITE user id (for example, since my ASURITE user id is kburger2 my folder would be named kburger2) and copy all of your .java source code files to this folder. Do not copy the .class files or any other files. Next, compress the <asuriteid> folder creating a zip archive file named <asuriteid>.zip (mine would be named kburger2.zip). Upload <asuriteid>.zip to the Project 3 by the project deadline. The deadline is in course schedule info

2 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.

3 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.

Here is an example gradebook.txt file:

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.

4 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<Student> list. Read the comments and implement the pseudocode.

Searcher

This class shall implement one static method int search(ArrayList<Student> 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<Student> 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.

2232_Burger_Case_UML_Diagram.png

5 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)
//********************************************************************************************************

https://fast.wistia.net/embed/iframe/2nb1vkubhc

https://fast.wistia.net/embed/iframe/4xgux9q44y

Reference no: EM131028525

Questions Cloud

Determine the required tension : The cord passing over the two small pegs A and B of the square board is subjected to a tension of 100 N. Determine the required tension P acting on the cord that passes over pegs C and D so that the resultant couple produced by the two couples is ..
Estimate the wavelength of a pitched baseball : The de Broglie relation applies to all "particles," not just electrons and photons. Calculate the wavelength of a neutron whose kinetic energy is 1 eV.
Deduce that xax-1 has the same period as a : Prove that a and axb ,where b is the inverse of a, have the same period.
State the axioms for an equivalence relation : Do the proof using both methods. Which is more "algebraic" (in the sense of "abstract" algebra)?
Stores the student information in an arraylist : Stores the student information in an ArrayList list. Read the comments and implement the pseudocode. A class which writes the gradebook information to gradebook.txt before the program exits.
Define the term normal subgroup : prove the generalisation of the first part of this question: consider the set H of all solutions, x, of the equation x n =e for fixed integer n ≥1 in an abelian group, G with identity , e.
Description of the diverse family system you selected : Description of the diverse family system you selected. Then explain a potential barrier they might encounter in society. Finally, explain one skill a social worker might use to address this barrier on an individual, family, organizational, group, ..
Does the average number of states per unit energy increase : Draw an energy level diagram for a nonrelativistic particle confined inside a three-dimensional cube-shaped box, showing all states with energies below 15· (h2/8mL2). Be sure to show each linearly independent state separately, to indicate the dege..
Estimate the minimum energy of three such particles : A nucleon (proton or neutron) can be thought of as a bound state of three quarks that are approximately massless, held together by a very strong force that effectively confines them inside a box of width 10-15 m. Estimate the minimum energy of thr..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a main function that reads pairs of positive integers

Prepare a function that has two positive integer parameters (say high and low) that returns the number of powers of two between (but not equal to) those parameters.

  Compute a program that calculates three resistance inputs

C language, compute a program that calculates three RESISTANCE inputs, and gives you the total resistance in OHMS. Like this, the total resistance is _____ ohms. These are three parallel circuits so the formula would be (1/R1 + 1/ R 2 +  1/ R 3 )  -1

  Write a digital music manager

Your DMM program must have a text-based interface which allows the user to select from a menu of options including: load, store, display, insert, delete, edit, sort, rate, and exit. The "load" option reads records from a file into a dynamic doubly..

  What is the size of the hash table

What is the size of the hash table?What are hFint256() (16) and hFint256() (257)?

  C program to mips program

Convert the following C program to MIPS program. Assuming that i, j, k, f, are stored in registers $s0, $s1, $s2, $s3 already. The base address of arrays A and B are in registers $s4 and $s5, respectively. (30

  Implement a card class and a composite deck class

Implement a Card class, a composite Hand class, and a composite Deck class for playing poker. Implement the following class hierarchy

  Prepare a set of uml class relationship diagrams

Give an initial list of candidate classes and responsibilities and give an initial set of CRC cards -  Prepare a set of 3 UML class relationship diagrams highlighting important relations among the discovered classes.

  Determines whether the ascii value is valid for the base

Accept a number base value in another register. Determines whether the ASCII value is valid for the base. Use the AsciiToDigit procedure

  Programing in c data validity

write a main function to input 20 integers in the range of 1 to 6. write a function count the number of times the numbers 2 and 5 occur. the function should declare static variables count2 and count5. check the data validity in the main functi..

  What difference between sequential access and direct access

What is the difference between sequential access and direct access? What do the seekg() and seekp() functions do? What do the read() and write() functions do?

  Public data members and private data members.

Explain the difference between public data members and private data members. Give an example in the main function to show that one C++ statement is valid and the other is invalid (you can use Grade class in Problem 5.

  Write an automated checkout program to expedite customers

A local department store hires you  to write an automated checkout program to expedite customers in a hurry. The  checkout line can only accept five items for any one purchase

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd