Report2 SDS PDF
Report2 SDS PDF
Report2 SDS PDF
CS301
SOFTWARE DESIGN
SPECIFICATION
MIETEN-PLACEMENT CELL ANDROID
APPLICATION
GROUP MEMBERS-
Kumari Renuka(U101115FCS111)
Rishabh K Kandoi(U101115FCS283)
Shailesh Mohta(U101115FCS)305
Luvkush Singh(U101115FCS113)
Kshiteej Manoj Gilda(U101115FCS110)
Manik Garg(U101115FCS199)
Page 1 of 48
TABLE OF CONTENT
1. Introduction................................................................................................................................2
1.1 Purpose of this document...............................................................................................................2
1.2 Scope of the development project..................................................................................................2
1.3 Definitions, acronyms, and abbreviations.....................................................................................2
1.4 References........................................................................................................................................2
1.5 Overview of document....................................................................................................................2
2. Conceptual Architecture/Architecture Diagram.....................................................................3
2.2 Structure and relationships............................................................................................................5
2.3 User interface issues........................................................................................................................6
3. Logical Architecture (Class Diagram, Sequence Diagram, State Diagram).........................6
3.1 Logical Architecture Description.................................................................................................18
3.2 Class name: Login.........................................................................................................................21
3.3 Class Name: Admin.......................................................................................................................22
3.4 Class Name: Notification..............................................................................................................25
3.5 Class Name: Upload_SamplePapers............................................................................................26
3.6 Class Name: Download_SamplePapers.......................................................................................27
3.7 Class Name: ListOfAppliedJobs..................................................................................................27
3.8 Class Name: ViewStudent’s_Profile_ByAdmin...........................................................................28
3.9 Class Name: View_CompStatistics_History................................................................................28
3.10 Class Name: AboutCompany_Detail.........................................................................................28
3.11 Class Name: PostFAQ_ByStudent.............................................................................................29
3.12 Class Name: ListToApplyForCompanies..................................................................................29
3.13 Class: Insert_CompStatistics_History.......................................................................................30
3.14 Class name: Student....................................................................................................................30
3.15 Class name: Answer_FAQ..........................................................................................................32
4.0 Execution Architecture..........................................................................................................32
4.1 Reuse and relationships to other products..................................................................................32
5.0 Design decisions and tradeoffs..............................................................................................32
6.0 Pseudocode for components..................................................................................................33
6.0.1 Class Name: Login....................................................................................................................33
6.0.2 Class Name: Notification...........................................................................................................35
6.0.3 Class Name: Upload_SamplePapers.........................................................................................35
6.0.4 Class Name: Download_SamplePapers....................................................................................37
6.0.5 Class Name: ListOfAppliedJobs...............................................................................................37
6.0.6 Class Name: ViewStudent’s_Profile_ByAdmin........................................................................38
6.0.7 Class Name: View_CompStatistics_History.............................................................................39
6.0.8 Class Name: AboutCompany_Detail........................................................................................40
6.0.9 Class Name: PostFAQ_ByStudent............................................................................................41
6.0.10 Class Name: ListToApplyForCompannies.............................................................................42
6.0.11 Class: Admin............................................................................................................................42
6.0.12 Class: Insert_CompStatistics_History....................................................................................44
6.0.13 Class: Student...........................................................................................................................45
6.0.14 Class: Answer_FAQ.................................................................................................................47
7.0 Appendices (if any).................................................................................................................48
Page 2 of 48
The Software Design Specification
1. Introduction
The Software Design Document is a document to provide documentation which will be used
to aid in software development by providing the details for how the software should be built.
Within the Software Design Document are narrative and graphical documentation of the
software design for the project including use case models, sequence diagrams, collaboration
models, object behaviour models, and other supporting requirement information.
In Scope:
a. Application for the job/internship by the students of the NIIT University.
b. Students can retrieve the information about the internship/jobs.
c. Preparation of the aptitude test.
Out of Scope:
a. Selection process for any internship
b. There is no communication between the NIIT University and the Industry via
this application.
1.4 References
Page 3 of 48
1. Introduction: describes about the document, purpose, scope of development
project definitions and abbreviations used in the document.
2. Conceptual Architecture/Architecture Diagram: describes the overview of
components, modules, structure and relationships and user interface issues.
3. Logical Architecture: describes Logical Architecture Description and
Components.
4. Execution Architecture: defines the runtime environment, processes,
deployment view.
5. Design Decisions and Trade-offs: describes the decisions taken along with
the reason as to why they were chosen over other alternatives.
6. Pseudocode for components: describes pseudocode, as the name indicates.
7. Appendices: describes subsidiary matter if any.
Architecture Diagram 1:
Architecture Diagram 2:
Page 4 of 48
2.1 Overview of modules / components
NOTE:
The horizontal lines represent the separation of modules.
More than one box within the same section represents sub-modules.
Page 5 of 48
2.2 Structure and relationships
Page 6 of 48
NOTE:
The boxes represent individual screens.
The circles represent actions that do not have screens.
The arrows represent navigation between screens.
Since User A is familiar with android applications, Mieten, will use common user
interface conventions. For example, links between screens will use ordinary, easy
to understand descriptions such as “Login”, ”Home”, ‘Upload CV” etc. To
maintain consistency, any other links will also appear in the bottom half of the
screen.
As we are clear that Mieten is exclusive to the Placement cell and the students of
NIIT University, the faculty members still can use this application in order to
know the status of placements every year, to be updated about the recent/new
Industry Collaborations and can help in spreading the network of NIIT University
across. Again, information fetching would be a few clicks away with minimal/no
extra efforts.
Class Diagram:
Page 8 of 48
Page 9 of 48
Sequence Diagrams:
Page 10 of 48
Sequence Diagram: Home
Page 11 of 48
Sequence Diagram: Sample Papers
Page 12 of 48
Sequence Diagram: Student Upload
Page 13 of 48
Sequence Diagram: View Update Contact Page
Page 14 of 48
State Diagrams:
Page 15 of 48
State Diagram: Admin View Profile
Page 16 of 48
State Diagram: Insert Company
Page 17 of 48
State Diagram: Student Account Page
Page 18 of 48
3.1 Logical Architecture Description
There are also some composition linkage, shown by lines with arrow, which signifies
that if the parent class is removed, the child class also loses it’s existence. These are:
PdfAdapter depends on ArrayAdapter<Pdf>, ViewProfile_Student and JobListings
depends on StudentAccount, AboutJob depends on Home, and FilePath depends on
Training_Admin.
The lines without arrow shows that the connection is bi-direction. It signifies that one
class just makes instance of other class, but not dependent on each other in any way.
These are: Pdf with Training_Student and ViewProfile_Admin, and PdfAdapter with
Training_Student and ViewProfile_Admin.
Arrow line signifies there is a send message taken place. Response is being shown by
dotted arrows.
3.1.2.1 AboutPage: Admin puts data on about page regarding company statistics,
which later can be viewed by student on their StudentAbout page.
Page 19 of 48
3.1.2.2 FAQ: Student posts question on this page, which later can be viewed by all
other students and can be answered by the Admin. On being answered by Admin, the
student also gets notification for the same.
3.1.2.3 Home: Admin posts company data through their InsertCompany Page, which
later is visible on the Home Page of the students. It also allows students to apply for
any job after their profile being approved.
3.1.2.4 Login Page: It allows students to login with their niitUniversity mail domain
and Admin to login with the username and password that are being registered in the
database already. It loops being on same page until the correct information is not
given.
3.1.2.6 Student Update Profile: Student can update their preference choices.
3.1.2.7 Student Upload CV: Student can upload CV by choosing the appropriate file
from their device, which then can be viewed by Admin also.
3.1.2.8 View Job Listing: Student views the list of jobs that he/she had applied for,
by the data being fetched from the server.
3.1.2.9 View Profile: Admin can search for the name of the student, by the data being
searched on the database and shown in response. Then the Admin can also download
the student’s CV and either approves that profile or sends notification to student for
requirement of any document. Approval is given only when no extra requirement of
document is there.
Initial state is being shown by starting with a black dot. Final State is being shown by
the black dot surrounded by an empty circle.
3.1.3.1 FAQ: On clicking the post button on FAQ page, it lands on Post page, which
requires to input data from the user. The user can either click on Ok, or Cancel button,
which lands up the user to the FAQ page again.
Page 20 of 48
3.1.3.2 FAQ Admin: On clicking on any question, it lands up in the Question page,
on which the answer can be typed for it. On clicking Answer button, it would again
land up the user on FAQ page.
3.1.3.3 Student Account: Three buttons available to be clicked are Job Listing,
Preference, and View Profile, clicking on which it lands up the user on their
respective pages. The Job listing page allows the user to click on company to land up
on company page and return to Job listing on clicking Back. On further clicking back,
moves the user to parent page. Preference page allows the user to choose preference
and click on Back to return to parent page. Profile page allows user to download CV,
and click on uploadCV button to open select File dialog. On clicking Back, the user
can return to the parent page.
3.1.3.5 Admin View Profile: Allows user to search for the profile from this page, and
if clicked on any profile being shown after search, then it lands on the profile page of
the student, on which the user can download CV, approve profile, notify for doc, or
click on Back to return to parent page.
3.1.3.6 Training: Student training page allows user to choose from files being shown
and download any of them by clicking on download button. Admin training page
allows user to upload sample paper by clicking on upload button, which then shows
up the select File dialog to choose file from the device or press Back to return to
parent page.
3.1.3.7 Insert Company: Allows user to enter company data by clicking on update
button.
3.1.3.8 Login Admin: Allows user to enter credentials, which are being checked for
authentication in the back-end. After being authenticated successfully, it lands up on
AdminLanding page. It has various buttons like FAQ, ViewProfile, Training,
InsertCompany, and About to land up on their respective pages, and click on Back to
return to AdminLanding page. On clicking on Logout, it returns to the parent page.
3.1.3.9 Student Login: Allows user to choose google account, which is being
checked for authentication in the back-end. On being authenticated successfully, it
lands up the user on the StudentLanding page. It has various buttons like About, FAQ,
Home, Notification, Contact and StudentAccount to land up the user to their
respective pages, and click on Back to return to StudentLanding page. On clicking
Logout, it returns to the parent page.
3.1.3.10 Admin About page: On clicking Add button, it lands up the user to the Add
Data page, which takes input the company data and statistics. On clicking Back, it
returns to the parent page.
Page 21 of 48
3.2 Class name: Login
Description: This class allows the user to enter the system by authenticating the
entered credentials.
Page 22 of 48
3.3 Class Name: Admin
Description
This class enables the admin to enter into the subsystem (Landing page) after
authenticating the entered credentials.
Description-
1) When a user click on faq button, It will call a method from button class
setOnClickListener.
2) Inside this method(setOnClickListener) It will create a object of Intent class.
3) Intent class object opens a new activity, which will get its content from
“faq.java” file.
4) Then a new page is opened using object of Intent class like -
startActivityForResult(intent, 0);
Page 23 of 48
Input: savedInstanceState , OnClickListener on View profile button
Description-
1) When a user click on View profile button, It will call a method from button
class setOnClickListener.
2) Inside this method(setOnClickListener) It will create a object of Intent class.
3) Intent class object opens a new activity, which will get its content from
“Viewprofile.java” file.
4) Then a new page is opened using object of Intent class like -
startActivityForResult(intent, 0);
Description-
1) When a user click on Training data button, It will call a method from button
class setOnClickListener.
2) Inside this method(setOnClickListener) It will create a object of Intent class.
3) Intent class object opens a new activity, which will get its content from
“Trainingdata.java” file.
4) Then a new page is opened using object of Intent class like -
startActivityForResult(intent, 0);
Description-
1) When a user click on Insert company button, It will call a method from button
class setOnClickListener.
2) Inside this method(setOnClickListener) It will create a object of Intent class.
3) Intent class object opens a new activity, which will get its content from
“Insertcompany.java” file.
4) Then a new page is opened using object of Intent class like -
startActivityForResult(intent, 0);
Page 24 of 48
3.3.7 Method 7: Approve profile
Description-
1) When a user click on Approve profile button, It will call a method from button
class setOnClickListener.
2) Inside this method(setOnClickListener) It will create a object of Intent class.
3) Intent class object opens a new activity, which will get its content from
“Approveprofile.java” file.
4) Then a new page is opened using object of Intent class like -
startActivityForResult(intent, 0);
Description-
1) When a user click on About button, It will call a method from button class
setOnClickListener.
2) Inside this method(setOnClickListener) It will create a object of Intent class.
3) Intent class object opens a new activity, which will get its content from
“About.java” file.
4) Then a new page is opened using object of Intent class like -
startActivityForResult(intent, 0);
Description-
1) When a user click on Contact button, It will call a method from button class
setOnClickListener.
2) Inside this method(setOnClickListener) It will create a object of Intent class.
Page 25 of 48
3) Intent class object opens a new activity, which will get its content from
“Contact.java” file.
4) Then a new page is opened using object of Intent class like -
startActivityForResult(intent, 0);
Input: mAuthListener
Method Description:
When activity start getting visible to user then onStart() will is called. Inside this
method parent onStart constructor and addAuthSateListener is invoked. Since it is a
Login activity so several state may occur like
1. Right after the listener has been registered
2. When a user is signed in
3. When the current user is signed out
4. When the current user changes
Hence this method listen to the listener and handle authentication state changes
Page 26 of 48
3.5 Class Name: Upload_SamplePapers
Class Description:
This class consists of a method named as uploadMultipart() which carries out the
upload task. It also consists of storage persmission which is required for this project
as it involves reading Android storage.
Method Description:
This method is responsible for pdf upload. We need the full pdf path and the name for
the pdf in this method. We are also using Filepath class to get the path of file chosen
from device.
Method Description:
This method shows file chooser using intent.
Input: view
Method Description:
This is an overriden method from View.OnClickListener interface.This is to link the
student page for training to the admin page, in order to view the uploaded documents
and to be able to download them also.
Input: NULL
Method Description:
This method is for requesting permission to external storage of the device.
Page 27 of 48
3.5.5 Method: onCreate (Bundle savedInstanceState)
Method Description:
This is an overriden method from AppCompatActivity class. It opens up the layout,
checks if permission for storage is given or not, and then attaches click event on the
buttons.
Class Description:
This class includes ListView, ArrayList of PDFs, ProgressDialog, PdfAdapter, and
their initializations. After fetching pdfs from the server, list of uploaded pdfs are
shown here, clicking on which they can also be downloaded to the external storage of
the device.
Method Description:
This method fetches data from server and show them in ListView which are clickable
in order to perform click event for downloading. It also uses a class ‘Pdf’, which has
only ‘get’ and ‘set’ methods for variables as pdf name and pdf url name.
Class Description:
This class fetches data from the server about the companies, the student had applied
for, in ListView format.
Method Description:
Page 28 of 48
This class uses a php url to fetch data from, and converts the fetched data to string
using BufferedReader and StringBuilder classes. Then Json data is parsed and shown
in listView format.
Class Description:
This class fetches data from ERP server to fill the student’s details automatically and
show them. It also allows student to upload CV and Aspiration Form, and choose
preferences within this page itself.
Input: Bundle object, data fetched from ERP server, and uploading some documents.
Method Description:
This method allows the user (Students of NIIT university using this application), to
view their profile which is fetched from NU ERP. This also lets them to upload their
resume and aspiration form.
Input: None
Output: Display Company names coming in college.
Description: Will enable to fetch the data of the company queried for.
Class Description:
This class allows admin to search for student’s profile and then view complete profile
of the student. Admin can also download the CV and Aspiration Form uploaded by
student and thus approve the profile if he finds everything at place.
Page 29 of 48
Output: Shows complete profile of the student.
Method Description:
This method allows the admin to search for the student profile and download their CV
and aspiration form to send approval or notify for any required document.
Class Description :
This class defines all the methods from the student side to be used to view the
questions and answers and post a question.
This class consists of 2 methods :
1. private void onCreate()
2. private void askQuestion()
Input: None
Output: This method will display the questions asked till now and the answers in a
List View.
Method Description : Method responsible for displaying the questions and answers.
Method Description: to send a question asked by the student to the server at the
backend.
Class Description – This home class will let you see status of different companies
coming to your college, like how many students are applying for this company. You
can even apply/ enroll for companies from this home class . This home tab can be
accessed easily after students login.
Page 30 of 48
Input: None
Description- This method will give you full details of the companies coming in
college and what are their requirements for applying for job in particular company.
Output: The user’s cv/ information is passed to the server(For Admin Approval).
Description- It will show all available companies , in which students can apply.
1) First it will ask for a user input to choose a company from the list available.
2) Then it will take user profile data like CV, and other useful information and
stores it in the servers, so that applied company/ Placement Team can approve
their registration done.
Description: This class consists of all the methods and initialization of the Navigation
drawer present in all the activities of the application. The navigation drawer is
basically the menu which slides from the left towards the right upon clicking the
action button situated on the top left corner of the application or by just providing
sliding input on the screen from left to right.
Input: None
Page 31 of 48
Description: This method basically initializes the various options seen in the
navigation drawer.
Input: None
Output: Sets up the Action Bar title whenever the Navigation drawer is opened or
closed.
Description: This method basically modifies the activity when the drawer is opened
and when the drawer is closed.
Output: The activity to be launched or the method to be executed upon clicking upon
any of the Navigation Drawer options.
Description: This method will handle all the action bar item clicks.
Page 32 of 48
Output: Sets the activity in order, basically the main function of this class.
Description: This class consists of all the methods to be used by the admin to view the
FAQ section, show the questions and answer the questions.
Input: None
Description: Method to display all the questions being asked by students using the
volley library.
The design decision to use two screens separately for admin and student is to provide
encapsulation. It may have been possible to get all the information on one screen.
However, using two screens will keep the data of admin separate from the data being
accessed by students.
A possible tradeoff when considering links is to use buttons instead of items in the
menu. This design decision - to use buttons for navigating between screens - is to
enhance visibility. Text links in the menu bar located at the bottom of the PDA’s
screen can be hard to see. The tradeoff for buttons with descriptive labels rather than
text links in the menu bar will be that navigation from screen to screen will be easier.
Descriptive labels will let the user know where he is navigating. Buttons are larger
Page 33 of 48
than the text links located in the menu bar of the PDA. Therefore, it is easier for the
user to locate the mechanisms needed to navigate from screen to screen.
Method 1: onCreate()
Pseudo-code:
Input: savedInstanceState , Email, Password
Output: Launch the Activity, SignIn
1. super.onCreate(savedInstanceState);
2. setContentView(R.layout.activity_main);
3. button = stores the ID of Google sign-in button
4. mAuth = get FirebaseAuth instance
5. editTextEmail = stores the ID of Admin editTextEmail
6. editTextPassword = stores the ID of Admin editTextPassword
7. buttonSignIn = stores the ID of Admin SignInButton
8. progressDialog = create new progressDialog object
9. button.setOnClickListener(new View.OnClickListener()
10. public void onClick(View v)
11. signIn() ) // Admin sign in
10. button.setOnClickListener(new View.OnClickListener()) //
Google sign in
11. mAuthListener = new FirebaseAuth.AuthStateListener()
12. public void onAuthStateChanged( FirebaseAuth firebaseAuth )
13. if firebaseAuth.getCurrentUser() != null then
14. start another Activity
15. end if
12. if firebaseAuth.getCurrentUser() != null then
13. finish();
14. start another Activity
15. end if
Page 34 of 48
Method 2: Admin_Login()
Pseudo-code:
Input: view, email, password
Output: Admin landing page of login successful
1. String email = get email from the user
2. String password = get password from the user
3. if string email!=null then
4. print the email of the user
5. return
6. end if
3. if string password !=null then
4. print the password of the user
5. return
6. end if
7. Shows progress print “Login in please wait”
8. verify (email, password) by sending it to firebaseAuth
9. result= get result from firebaseAuth
10. public void onComplete()
11. Dismiss the progress dialog
12. if result is Successful then
13. finish();
14. start another Activity leading to Admin Landing page
15. end if
Method 3: user_Login()
Pseudo-code:
Input: SignIn through Google
Output: Student landing page of login successful
1. Intent signInIntent = get signIn Intent from Google for the given Google client
2. if signInIntent==Google client then
3. start another activity leading to student landing page
Page 35 of 48
4. else
5. print message login unsuccessful
6. end if
Method 1: Notification()
Pseudo-code:
Input: mAuthListener
Output: handle authentication state changes
1. String strtitle = set notification title
2. String strtext = set notification text
Method 1: uploadMultipart ()
Pseudo-code:
Input: Name and path of the file name.
Output: Handles uploading pdf
Page 36 of 48
by “FilePath.getpath ()”.
2. Notify if path is NULL.
3. ELSE:
4. TRY:
5. A) Initialize string ‘uploadid’ to ‘UUID’.
6. B) Make ‘MultipartUploadRequest’ object to start uploading.
7. CATCH: Handle ‘EXCEPTION’.
Method 2: showFileChooser ()
Pseudo-code:
Input: Option to choose from location of file to upload from device.
Output: Helps to choose file from device.
1. Make an ‘Intent’ object and set it’s Type to ‘application/pdf’, and set ‘Action’ to
‘ACTION_GET_CONTENT’.
2. Call method ‘startActivityForResult’ to start Intent.
Pseudo-code:
Input: view
Output: Perform action after button being clicked.
Method 4: requestStoragePermission ()
Pseudo-code:
Input: NULL
Output: Ask for permission.
Pseudo-code:
Input: Bundle object and button clicks.
Output: Sets onClickListener on buttons.
Page 37 of 48
4. Initialize buttons ‘buttonUpload’, ‘buttonChoose’, and ‘buttonFetch’ by
choosing appropriate ids to map to.
5. Make ‘EditText’ object.
6. Set ‘onClickListener’ on buttons created.
Pseudo-code:
Input: Bundle object and button clicks.
Output: Downloads pdf.
Pseudo-code:
Input: Bundle object.
Output: Shows companies the student had applied for.
Page 38 of 48
2. Call method ‘setContentView(layout_name)’.
3. Initialize string variable and ‘InputString’ object to NULL.
4. TRY:
5. A)Make ‘DefaultHttpClient()’ object and set ‘HttpPost’ object to point to a
php url to fetch data from.
6. B)Make ‘HttpResponse’ object ‘response’ and ‘HttpEntity’ object.
7. CATCH: Handle ‘Exception’.
8. TRY:
9. A) Make ‘BufferedReader’ object to convert the response to string.
10. B) Use ‘StringBuilder’ object also.
11. CATCH: Handle ‘Exception’.
12. TRY:
13. A) Make ‘JSONArray’ object and pass the converted string to it.
14. B) Make ‘ArrayList<String>’ object.
15. C) FOR: each ‘i’ in ‘jArray.length()’
16. i. ‘JSONObject json_data = jArray.getJSONObject (i)’.
17. ii. ‘String str = String.valueOf (json_data.getInt (“CompanyData”))’.
18. iii. ‘arrayList.add (str)’.
19. D) ‘ArrayAdapter items = new ArrayAdapter (this, arrayList)’.
20. E) ListView listView = assign it to an ‘id’.
21. F) ‘listView.setAdapter (items)’.
22. CATCH: Handle ‘JSONException’.
Pseudo-code:
Input: Bundle object, data fetched from ERP server, and uploading some documents.
Output: Shows complete profile of the student.
Page 39 of 48
18. iii. ‘arrayList.add (str)’.
19 D) ‘ArrayAdapter items = new ArrayAdapter (this, arrayList)’.
20. E) ListView listView = assign it to an ‘id’.
21. F) ‘listView.setAdapter (items)’.
22. CATCH: Handle ‘JSONException’.
23. Make ‘Button’ objects ‘UploadCv’ and ‘UploadAspirationForm’.
24. Make ‘EditText’ object to read entered name for CV and Aspiration form.
25. Check if ‘selfPermission’ is ‘granted’ or not.
26. Show appropriate message if user has denied permission at first attempt.
27. Ask for permission by calling method ‘requestPermission’.
28. IF permission is granted, THEN:
29. Set ‘onClickListener’ on the buttons, which has an overriden method
‘onClick(View view)’ defined as:
30. A) Make an ‘Intent’ object and set it’s Type to ‘application/pdf’, and
set ‘Action’ to ‘ACTION_GET_CONTENT’.
31. B) Call method ‘startActivityForResult’ to start Intent.
32. C) Initialize string ‘str’ to ‘uploadFileName’ and string ‘path’ to
pathName given by “FilePath.getpath ()”.
33. D) Notify if path is NULL.
34. ELSE:
35 TRY:
36. i. Initialize string ‘uploadid’ to ‘UUID’.
37. ii. Make ‘MultipartUploadRequest’ object to start
uploading.
38. CATCH: Handle ‘EXCEPTION’.
Method 1: getCompData()
Pseudo-Code:
Input: None
Output: Display Company names coming in college.
1. JSONObject obj = new JSONObject(response);
2. JSONArray nameArray = obj.getJSONArray("CompaniesNames");
3. for (int i = 0; i < nameArray.length(); i++)
a. JSONObject nameObject = nameObject.getJSONObject(i);
b. CompaniesNames names = new
names(heroObject.getString("CompaniesNames"));
c. namesList.add(names);
4. End for
5. ListViewAdapter adapter = new ListViewAdapter(namesList,
getApplicationContext());
6. listView.setAdapter(adapter);
Method 2: showStats()
Pseudo-Code:
Page 40 of 48
Input: Student profile info/CV .
Output: The user’s cv/ information is passed to the server(For Admin Approval).
1. String info = infoTextBox.getText();
2. RequestQueue queue = Volley.newRequestQueue(this);
3. String url = String.format("Address of the server"), StringRequest request =
new StringRequest(Request.Method.POST, url, new Response.Listener<String>()
4. public void onResponse(String response)
5. new ApiErrorListener(this));
6. queue.add(request);
Pseudo-Code:
Input: Bundle object.
Output: Shows list of companies, their info and their statistics in reference to the
number of students applied, selected.
Page 41 of 48
6.0.9 Class Name: PostFAQ_ByStudent
Pseudo-Code:
Input: None
Output: This method will display the questions asked till now and the answers in a
List View.
Pseudocode :
Input: The question string asked by the student.
Output: The question asked is sent to the server.
1. String question = Question that the student wants to post on the forum.
2. RequestQueue queue = Volley.newRequestQueue(this);
3. String url = String.format("Address of the server"),
StringRequest request = new StringRequest(Request.Method.POST, url,
new Response.Listener<String>()
public void onResponse(String response)
new ApiErrorListener(this));
4. queue.add(request);
Page 42 of 48
6.0.10 Class Name: ListToApplyForCompannies
Method 1: GetCompaniesNames()
Pseudo-Code:
Input: None
Output: Display Company names coming in college.
1. JSONObject obj = new JSONObject(response);
2. JSONArray nameArray = obj.getJSONArray("CompaniesNames");
3. for (int i = 0; i < nameArray.length(); i++)
a. JSONObject nameObject = nameObject.getJSONObject(i);
b. CompaniesNames names = new
names(heroObject.getString("CompaniesNames"));
c. namesList.add(names);
4. End for
5. ListViewAdapter adapter = new ListViewAdapter(namesList,
getApplicationContext());
6. listView.setAdapter(adapter);
Method 2: ApplyForCompanies()
Pseudo-Code:
Input: Student profile info/CV .
Output: The user’s cv/ information is passed to the server(For Admin Approval).
1. String info = infoTextBox.getText();
2. RequestQueue queue = Volley.newRequestQueue(this);
3. String url = String.format("Address of the server"), StringRequest request =
new StringRequest(Request.Method.POST, url, new Response.Listener<String>()
4. public void onResponse(String response)
5. new ApiErrorListener(this));
6. queue.add(request);
Method 1: FAQ()
Pseudo-Code:
Input: savedInstanceState , OnClickListener on FAQ button
Output: Launch the Activity
1. super.onCreate(savedInstanceState);
2. setContentView(R.layout.activity_main);
3. button = stores the ID of FAQ button
4. button1.setOnClickListener(new View.OnClickListener()
5. public void onClick(View view)
6. Intent intent = new Intent(view.getContext(), faq.class);
7. startActivityForResult(intent, 0);
Page 43 of 48
Method 2: View profile()
Pseudo-code:
Input: savedInstanceState , OnClickListener on View profile button
Output: Launch the Activity
1. super.onCreate(savedInstanceState);
2. setContentView(R.layout.activity_main);
3. button = stores the ID of View profile button
4. button1.setOnClickListener(new View.OnClickListener()
5. public void onClick(View view)
6. Intent intent = new Intent(view.getContext(),viewprofile.class);
7. startActivityForResult(intent, 0);
Pseudo-Code:
Input: savedInstanceState , OnClickListener on Training data button
Output: Launch the Activity
1. super.onCreate(savedInstanceState);
2. setContentView(R.layout.activity_main);
3. button = stores the ID of Training data button
4. button1.setOnClickListener(new View.OnClickListener()
5. public void onClick(View view) {
6. Intent intent = new Intent(view.getContext(),traningdata.class);
7. startActivityForResult(intent, 0);
Pseudo-code:
Input: savedInstanceState , OnClickListener on Insert company button
Output: Launch the Activity
1. super.onCreate(savedInstanceState);
2. setContentView(R.layout.activity_main);
3. button = stores the ID of Insert company button
4. button1.setOnClickListener(new View.OnClickListener()
5. public void onClick(View view)
6. Intent intent = new Intent(view.getContext(),insertcompany.class);
7. startActivityForResult(intent, 0);
Pseudo-code:
Input: savedInstanceState , OnClickListener on Approve profile button
Output: Launch the Activity
1. super.onCreate(savedInstanceState);
Page 44 of 48
2. setContentView(R.layout.activity_main);
3. button = stores the ID of Approve profile button
4. button1.setOnClickListener(new View.OnClickListener()
5. public void onClick(View view) {
6. Intent intent = new Intent(view.getContext(),approveprofile.class);
7. startActivityForResult(intent, 0);
Method 6: About
Pseudo-code:
Input: savedInstanceState , OnClickListener on About button
Output: Launch the Activity
1. super.onCreate(savedInstanceState);
2. setContentView(R.layout.activity_main);
3. button = stores the ID of About button
4. button1.setOnClickListener(new View.OnClickListener()
5. public void onClick(View view)
6. Intent intent = new Intent(view.getContext(),about.class);
7. startActivityForResult(intent, 0);
Method 7: Contact
Pseudo-code:
Input: savedInstanceState , OnClickListener on Contact button
Output: Launch the Activity
1. super.onCreate(savedInstanceState);
2. setContentView(R.layout.activity_main);
3. button = stores the ID of Contact button
4. button1.setOnClickListener(new View.OnClickListener()
5. public void onClick(View view)
6. Intent intent = new Intent(view.getContext(),contact.class);
7. startActivityForResult(intent, 0);
Method 1: updateCompanyDetails()
Pseudo-code:
Input: None
Output: All the questions being asked by students.
Page 45 of 48
c. questionList.add(question);
4. End for
5. ListViewAdapter adapter = new ListViewAdapter(questionLIst,
getApplicationContext());
6. listView.setAdapter(adapter);
Pseudo-code:
Input: The question id of the question asked.
Output: The answer to the question is passed to the server.
1. String answer = answerTextBox.getText();
2. RequestQueue queue = Volley.newRequestQueue(this);
3. String url = String.format("Address of the server"),
StringRequest request = new StringRequest(Request.Method.POST, url,
new Response.Listener<String>()
public void onResponse(String response)
new ApiErrorListener(this));
4. queue.add(request);
Method 1: addDrawerItems()
Pseudo-code:
Input: None
Output: Initializes the various options in Navigation Drawer.
String navOptions[] = {"Home","FAQ","View Jobs","About Us"};
1. mAdapter = new
ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,navOptions);
2. mDrawerList.setAdapter(mAdapter);
3. mDrawerList.setOnItemClickListener(new AdapterView.OnItemClickListener()
4. public void onItemClick(AdapterView<?> parent, View view, int position, long
id)
5. Display or go to the wherever the user wants to navigate to.
Method 2: setupDrawer()
Psudo-code:
Input: None
Output: Sets up the Action Bar title whenever the Navigation drawer is opened or
closed.
1. mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,
R.string.drawer_open, R.string.drawer_close)
2. public void onDrawerOpened(View drawerView)
3. super.onDrawerOpened(drawerView);
4. getSupportActionBar().setTitle("Navigation!");
Page 46 of 48
5. invalidateOptionsMenu();
6. public void onDrawerClosed(View view)
7. super.onDrawerClosed(view);
8. getSupportActionBar().setTitle(mActivityTitle);
9. invalidateOptionsMenu();
10. mDrawerToggle.setDrawerIndicatorEnabled(true);
11. mDrawerLayout.setDrawerListener(mDrawerToggle);
Pseudo-code:
Input: MenuItem item (Object item of class MenuItem)
Output: The activity to be launched or the method to be executed upon clicking upon
any of the Navigation Drawer options.
1. int id = item.getItemId();
2. if (mDrawerToggle.onOptionsItemSelected(item))
3. return true;
4. return super.onOptionsItemSelected(item);
Pseudo-code:
Input: Bundle savedInstanceState
Output: Call the sync state method of the ActionBarDrawerToggle object.
1. super.onPostCreate(savedInstanceState);
2. mDrawerToggle.syncState();
Pseudo-code:
Input: Configuration newConfig
Output: Calls the onConfigurationChanged method of the ActionBarDrawerToggle
object.
1. super.onConfigurationChanged(newConfig);
2. mDrawerToggle.onConfigurationChanged(newConfig);
Pseudo-code:
Input: Bundle savedInstanceState
Output: Sets the activity in order, basically the main function of this class.
1. super.onCreate(savedInstanceState);
2. setContentView(R.layout.activity_main);
3. mDrawerList = (ListView)findViewById(R.id.navList);
4. mDrawerLayout = (DrawerLayout)findViewById(R.id.drawyer_layout);
5. mActivityTitle = getTitle().toString();
Page 47 of 48
6. addDrawerItems();
7. setupDrawer();
8. getSupportActionBar().setDisplayHomeAsUpEnabled(true);
9. getSupportActionBar().setHomeButtonEnabled(true);
Method 1: showQuestions()
Pseudo-code:
Input: None
Output: All the questions being asked by students.
Pseudo-code:
Input: The question id of the question asked.
Output: The answer to the question is passed to the server.
5. String answer = answerTextBox.getText();
6. RequestQueue queue = Volley.newRequestQueue(this);
7. String url = String.format("Address of the server"),
StringRequest request = new StringRequest(Request.Method.POST, url,
new Response.Listener<String>()
public void onResponse(String response)
new ApiErrorListener(this));
8. queue.add(request);
Page 48 of 48