当前位置:天才代写 > JAVA代写 > Java project代写 java项目代写 code代写

Java project代写 java项目代写 code代写

2020-07-22 15:52 星期三 所属: JAVA代写 浏览:16

Java project代写

 

Java project代写 student’s seating assignment.Feel free to reuse any of the code from the modules to complete the requirements.

Java project代写
Java project代写

For this project, you will create a class for an elementary school that will allow a teacher to enter each student’s seating assignment. Java project代写

Occasionally, the teacher may need to switch the seating assignment of a student.  If there is a seat available, the student is moved. If all of the seats are already assigned, the teacher will have two students trade seats.     Java project代写

Feel free to reuse any of the code from the modules to complete the requirements.

Note: I do not award or deduct points for style, but to make grading easier on me, please to do use comments to explain your code.  I find explanatory comments distracting.  If you need comments for your own use, save a copy for yourself, then remove the comments before uploading your work.Java project代写

User Interface Logic

Main Class

This class will be responsible for any and all user interaction.   This means that if you want to get input from the user, or display output to the user, all of that code must be in the main class.  This keeps all user interaction in one class, separate from the business logic of the program.  By keeping your user interface logic in a separate class, it will make it SO much easier to reuse your business logic classes in other types of applications, like GUI applications, later on.Java project代写

  • Create a main method in its own class.  The main method should create an object of the seatingChart class (defined below) and call its methods for testing purposes.  Java project代写

Business Logic

Student Class

  • private member data
    1. String first
    2. String last
    3. int student id
  • public methods:
    1. public Student(String first, String last, int id): A constructor with parameters to set the instance variables.
    2. public String toString(): This method should return a string that contains all of the private member data as a single string.  Be kind to your client and make it readable.
    3. An accessor (getter) method for each instance variable.

SeatingChart Class

  • Create a separate class called seatingChartthat has an  array of student objects as a private instance member of the seattingChart class.  The array of student objects should be size 20. The seatingChart class must also have these methods:
    1. public void addStudent(String first, String last, int id, int seatnum) —This method should add one student to the specified seat number on the seating chart. Position 0 of the array represents the seat closest to the teacher’s desk.  Java project代写 The array index will represent each seat number for the seating assignments.
    2. public int findStudent(String first) — This method should search the seating chart and return the seat number of a specified student first name.  Remember, The array index will represent each seat number for the seating assignments, so this method should return the array index number as the seat number.  This method should use the binary search algorithm described in the modules.Java project代写
    3. public void swapStudent(String first, int targetSeat) —This method should find the students name in the array by calling the findStudent method, and then move the student object from his or her original seat to the target seat as a swap.  No students should be lost;  if the target seat is not empty, the students will trade seating assignments.Java project代写
    4. public String toString() — This method will return a string that holds the entire seating chart, but this string will only include each seat number (empty or filled) and only the first name of the student in that seat. You can choose how the information is formatted in the string, but be kind to your client and make it readable. Java project代写

Paste the output of your program in the submission window and upload your .java file(s) to submit your work.Java project代写

Java project代写
Java project代写

更多其他:CS代写 cs作业代写 c作业代写 C语言代写 essay代写 java代写 java代码代写 java作业代写

合作平台:天才代写 幽灵代写  写手招聘 Essay代写

 


天才代写-代写联系方式