Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Classes from Project 1 (Accounts and User) will be reused with the modifications listed in the class description. The Accounts class will be renamed

The Classes from Project 1 (Accounts and User) will be reused with the modifications listed in the class description. The Accounts class will be renamed CompanyAccounts to avoid confusion User Class Subclass of Account class. Instance variables username same as project 1 fullName String deptCode int representing the department code No other instance variables are needed. Methods Default constructor sets all instance variables to a default value Call the super class constructor passing appropriate parameters to it. Set the rest of the variables Parameterized constructors Takes in the same parameters as Project 1. Additional parameters include fullname, and dept code.. Call the super class constructor passing appropriate parameters to it. Accessor and mutator methods for all variables in this class. Mutator method should be used to set all instance fields. toString Calls super class methods as needed. Returns a nicely formatted String representing the user to include fullName, username, deptCode, accountID number, clearPassword, encryptPassword and key Bot Class Subclass of Account class. A class that stores information about an application that performs an automated task. Instance Variables botFileName String representing the file name of the bot category String providing the Bot category which will be either IDS, SysAdm, or HelpDesk. dateUpdated GregorianCalendar object (from the Java API) that shows the date the Bot was last updated. createdBy String representing the creator name or handle. Methods Default constructor sets all instance variables to a default value Call the super class constructor passing appropriate parameters to it. Set the rest of the variables Parameterized Constructor Takes in all parameters required to set the instance variables. Date is a String in the format mm/dd/yyyy. Convert the date to a format compatible with creating GregorianCalendar object. Create the GregorianCalendar object Call the super class constructor passing appropriate parameters to it Accessor and mutator methods for all variables in this class. toString Calls super class methods as needed Returns a nicely formatted String representing the Bot to include Bot file name, purpose, date updated, creator name, accountID number, clearPassword, encryptPassword and key Account class Superclass Instance variables clearPassword String must be >= 8 characters and contain at least one number and one special character (#,$,%,&) no other characters allowed. encryptedPassword : String key : String accountId - A unique integer that identifies each account nextIDNum a static int that starts at 1000 and is used to generate the accountID no other instance variables needed. Default constructor set all instance variables to a default value. Parameterized constructor Takes in clearPassword, key. Calls encrypt method (same as project 1) to create encryptedPassword Call mutator methods to set other instance variables. Accessor/mutator methods (Standard except as follows) clearPassWord - mutator needs to call encrypt method no encryptedPassword mutator method key mutator needs to call encrypt method. accountId mutator - uses the static variable nextIDNum to retrieve the next available userID number encrypt method same as project 1. toString - returns a nicely formatted String representing the instance variables of the Account class NOTE: Your Account class should ensure the clearPassword is valid as described in the requirements. If not write an error message to the standard output and continue. Set the clearPassword and encyrptedPassword to the empty String. CompanyAccounts Class The array will be of type Account Method names, return types and parameters would change from User to the new super class Account for example getUser would change to getAccount and return an Account Object addUser would change addAccount and its parameter would be of type Account. The AccountTester This class should consists of a main method that tests all the methods in each class, either directly by calling the method from the Tester or indirectly by having another method call a method. User and Bot information will be read from a file. A sample file is provided. Use this file format to aid in grading. Using file processing makes entering and testing program with data sets much more efficient. The file created should include valid and invalid passwords that fully tests the application. Simple text file process is covered in Absolute Java Chapter 2. Included is file called data.txt contains Account data. Your project will be graded using a similar input file. Your project must run with an input file formatted as data.txt is formatted. Note the file format is as follows: Character designation of type of player ( u- User, b - Bot) User username,fullname,deptCode Bot botFilename,category,dateUpdated,createdBy Account data common data for both types Creates a CompanyAccounts objects. Populate the CompanyAccounts Object with both User and Bot objects. Retrieves each object stored in the CompanyAccounts object and calls its toString method polymorphically and displays the results. Create UML Class Diagram for the final version of your project. The diagram should include: All instance variables, including type and access specifier (+, -); All methods, including parameter list, return type and access specifier (+, -); Include Generalization and Aggregation where appropriate. The AccountTester does not need to be included. Refer to the UML Distilled pdf on the content page as a reference for creating class diagrams. A Link to a drawing program, Dia, is also posted on the content page. Submission Requirements: Your project must be submitted using the instructions below. Any submissions that do not follow the stated requirements will not be graded. 1. You should have 10 files for this assignment: CompanyAccounts.java - The CompanyAccounts class User.java - The User class Bot.java - The Bot class Account.java The Account class. AccountTester.java A driver program for your project data.txt - your test file Simply UML Class diagram of your 4 classes, do not include the Tester. (Dia file or image file , jpg, gif, pdf etc) The javadoc files for all the classes except the tester.(Do not turn in) 2. Remember to compile and run your program one last time before you submit it. If your program will not compile, the graders will not be responsible for trying to test it.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

Students also viewed these Databases questions