Transcribed TextTranscribed Text

Assignment 2 –Student Management System 1. General Info You are to help CIMP to write Student Management System (StuSys). The system will used by guidance to help keep track of student’s marks and other information. The system has the following requirements: • Has a login system, where each student has a login password. • Has a create new student function, for new students to be entered into the system. • Once logged into a student’s account, she/he has the following options: o Student detail info o Add a course o Drop a course o Edit a course grade o Change password o Logout 2. Program Flow 3. User Interface a) Main Screen b) New Student Screen c) Login Screen (For Returning Students) d) Returning Students Option Screen (After logging in) e) Student Detail Screen f) Add Course Screen The Detailed Screen after adding a course g) Drop Course Screen Detailed Screen after dropping a course h) Edit Course Screen Detailed Screen after editing the course (MDM4U) I) Change Password Screen 4. UML Diagram Here’s the UML diagram of the program. Your program must follow the same structure. 5. How Info is Stored in the Database The database stores the accounts in a String array. Each block in the array contains only one student and it has the following format: [Account ID]:[Student Name]:[Password]:[CourseCode1-Grade1]:[CourseCode2-Grade2]: … :[CourseCodeN-GradeN] Note: • Each item is separated by a colon “:” • Account ID starts at 1000000, and it increments by 1 after it has been assigned • Password must contain exactly 6 digits (No characters or symbols) • Students may and may not have an courses. • Grades must be integer value (no decimals) 6. Text File The program comes with a text file called “StuSysAcctInfo.txt”, that contains some dummy account information. You may import it into the database, so that you may test your program easily. To import it, you must use the ImportAcct() in the Database class. It is already written for you. Note: The account ID is not in the textfile, because your program should automatically generate the ID. Example of the textfile: Kevin Wong:000000 Sunny Wong:111111:MHF4U-75:ENG4U-71:AMU4M-83:MDM4U-tbd Maggie Zhu:222222:MDM4U-89:MHF4U-92:ENG4U-65:MCV4U-98:SBI4U-77 Joan DiNardo:333333:MDM4U-74:MHF4U-86:ENG4U-99:MCV4U-88:SBI4U-50 7. Error Checking • Program must check if password has 6 digits or not, and warn the user accordingly • Must check if the new password and retyped password match. • Must make sure users entered valid options (In Main screen, Logged In screen, Delete Course screen & Edit Course screen) • Assume options entered will always be the correct type (don’t have to check invalid data types) 8. Requirements • Program must follow the program flow chart. Make sure you implement your program by using methods and classes. • Each class must be in its separate file to improve readability and maintainability. • Do not create extra classes. • Do not use anything that’s not taught in Unit 1 and Unit 2 (Eg: ArrayList, LinkedList, 2D-Array, etc.) • Use the Database class to help you access the data. Read the documentation to help you understand how to use each methods in it. The code is provided, but it is not necessary to understand what is happening in each of the method. Just understand the method header is enough. • Must complete all the methods in the template. Must complete each method template and use them throughout the program. May create helper methods only. • Program must follow the UML diagram.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

   /* The default constructor. Initializes the database. */
   public Database() {
      allAcct = new String[DEFAULT_NUM_ACCOUNT];
      numAcct = 0;
   /* The constructor that allows the caller to
    * specify the maximum number of accounts it
    * can store
    * @param maxNumAcct - The maximum number of accounts the
    *                     database can store */
   public Database( int maxNumAcct ) {
      allAcct = new String[ maxNumAcct ];
      numAcct = 0;
   //=================== PUBLIC METHODS ===================//
   /* Used for testing purposes: Import account information from
    * the textfile
    * @param filename - The file that contains the data. Use "StuSysAcctInfo.txt"
    * @param currNewId - The account ID # that the imported accounts will
    *                   start with
    * @return          - The number of accounts that has been added to the
    *                   database */
   public int ImportAcct( String filename, int currNewId ) {
      numAcct = 0;
         // pass the path to the file as a parameter
         File file = new File(filename);
         Scanner sc = new Scanner(file);
         String infoStr;
         while (sc.hasNextLine()) {
            infoStr = sc.nextLine();
            if( !infoStr.equals("") ) {
               allAcct[numAcct] = currNewId + ":" + infoStr;
      catch (IOException ex)
         System.out.println("Import Error: Unable to complete the task");
      return numAcct;      
   /* Create a new account
    * @param acctInfo - The String that contains all the info for the account
    *                   to be created
    * @return         - The account creation status.
    *                   True if the account is created successful
    *                   False otherwise */
   public boolean AddAcct(String acctInfo) {
      if( numAcct < allAcct.length ) {
         allAcct[numAcct] = acctInfo;
         return true...

By purchasing this solution you'll be able to access the following files:

for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats