Exercises, Milestones and Term Projects:

Exercise 1: (5 points) Use ArgoUML as a tool to draw the UML class diagram and use-case diagrams for the following software system. (Grading: 2 points for each type of diagram, and 1 point for providng PDF file or WORD file containing all diagrams as jpg images captured from the screen using PrintScreen key.) For CS1631 students the diagrams should be e-mailed to the TA. Diagrams may require footnotes and/or comments.

Consider the following set of requirements for a university information system that is used to keep track of students transcripts. The first requirement RS1 concerns the data to be kept in permanent storage, which is further broken down into five parts.

RS1a. The university keeps track of each student's name, student number, social security number, current address and phone, permanent address and phone, birthdate, sex, class (freshman, sophomore, ..., graduate), major department, minor department (if any), and degree program (B.A., B.S., ..., Ph.D.). Some user applications need to refer to the city, state, and zip of the student's permanent address, and to the students' last name. Both social security number and student number have unique values for each student.

RS1b. Each department is described by a name, department code, office number, office phone and college. Both name and code have unique values for each department.

RS1c. Each course has a course name, description, code number, number of semester hours, level, and offering department. The value of code number is unique for each course.

RS1d. Each section has an instructor, semester, year, course, and section number. The section number distinguishes different sections of the same course that are taught during the same semester/year; its values are 1, 2, 3, ...; up to the number of sections taught during each semester.

RS1e. A grade report has a student, section, and grade.

The other requirements for this application are: (RS2) An administrator can update the courses to be taught by instructors, and enter the list of students taking a course. (RS3) An instructor can enter and update the grades of the course(s) taught by this instructor. (RS4) A student can request a grade report from the information system.

Solution to Exercise 1: There can be different solutions. Class diagram with labelled associations such as teacher teaches class. Use case diagram with some "include" relations for commonly used cases.


Exercise 2: (5 points) Continue with Exercise 1 and draw the state and activity diagrams, the sequence and collaboration diagrams, and the component/deployment diagram (each diagram is 1 point). For CS1631 students the diagrams should be zipped and e-mailed to the TA.

The additional requirements for this application to be considered: (RS5) A student can fill out an online add/drop form. (RS6) A student may request an instructor to approve the add/drop form. (RS7) The add/drop form must be approved by the administrator. (RS8) The add/drop information is entered into the database.

Solution to Exercise 2: There can be different solutions. A solution should include at least the (revised) use case diagram, the (revised) class diagram, one or more collaboration and sequence diagram (only collaboration diagram is shown here), one or more activity and state diagram (only activity diagram is shown here), and one or more deployment diagram. The five types of diagrams should form a complete specification of the application described above. The degree of completeness is 1 point. Please submit a single PDF file or WORD file containing all the diagrams.


Exercise 3: (5 points) (I) Make a business case to justify either the in-house development of the university information system, or farming it out to a software developer, or taking a "hybrid" approach. There is no "correct" answer for this exercise. Rather, what matters is how you argue your case based upon a combination of logic, facts, simple calculations and reasonable assumptions. The time-window for making the business case is five years. The following are known facts: (a) labor cost for programmers is $50/hour for in-house development, (b) labor cost for programmers is $30/hour for external developers, (c) each GUI component takes 300 hours on the average to develop, 50 hours of end-user time to test and $40/hour for end-user to do testing, (d) each service component takes 500 hours on the average to develop, (e) each domain component takes 800 hours on the average to develop, (f) maintenance efforts in a five-year period is equal to development efforts, (g) productivity factors are the same as given in the text book, (h) total number of unduplicated users is 10,000, (i) number of applications over a five-year period is 50 regardless of the type of components, (j) complexity cost is $20,000 per component, (k) application framework cost is assumed to be zero (i.e., absorbed by the corporation). (Any other parameters you need must be estimated by you.)
(II) Take the use case diagram from Exercise 1, apply the Use Case Point (UCP) technique to estimate the development effort in person hours. You may use all the parameters cited in the classnotes on UCP. Finally, assuming the labor cost is $100 per person hours, estimate the cost for application software development.

Solution to Exercise 3: There can be different solutions.

A canonical solution shows the possible range of answers and how grading is to be done.



Exercise 4: (5 points) (I) The UML provides a common language for software developers to communicate with each other. In the term project, each team/person will use UML for the specification of the software component to be developed by this team/person.
For CS1631 students this becomes a 2-person group exercise to develop the software plan and the UML specification. One person can work on the software plan, while the other person concentrates on the UML diagrams.
The UML diagrams to be delivered include the use case diagram, the class diagram, the activity diagram (or state diagram) the collaboration diagram (or sequence diagram), and development/deployment diagram. These five types of diagrams are chosen because they can all be created using the software tool ArgoUML as long as feedback loops are avoided. In creating the class diagram, try to remain consistent with the requirements for the mobile phone voting system, or the requirements for the personal healthcare system, or the requirements for the pet care system. For the mobile phone voting system, the name of messages and variables used in the diagrams should remain consistent with the basic voting message types and variables supplied by the instructor. For the perosnal healthcare system, the name of messages and variables used in the diagrams should also remain consistent with the basic SIS message types and variables supplied by the instructor. If you follow these rules it will be easier later to integrate the UML diagrams to generate a combined overall specification.
(II) Please go to: http://ksiresearchorg.ipage.com/spg/ and use this SPG tool to learn about different software process models. When you enter the parameters according to the needs of your project, what software process model is suggested by SPG? Is this suggestion consistent with your expectations? You should try at least Waterfall and XP. After you have tried it please fill out the questionnaire. The deliverable is a PDF file or WORD file containing the screen dumps captured using PrintScreen key.

Milestone 1: Test interface between remote control and component. (5 points) You can download and install the SIS server, Java components (and Android components) following the system installation procedure. You should have already started the implementation of the component, concentrating on the interface with the server. Please study the following temperature monitoring component to develop your own component. You will demonstrate how your component can interact with the remote control. The scenario is as follows: First you run the remote control, which will appear on the screen. Then you use the remote control to send a message to your component. The message typically consists of some variables and their values. You can enter the variable names and values through the remote control. The output message should also appear on the remote control. If you are using Java, test your component using the remote control (Java version). The instructions on how to use the remote control is described in the ReadMe_V5.txt. For smart phones there is a remote control (Android version) in the Android software package downloadable following the System Installation Procedure described above. The remote control (Android version) has multiple menu pages. Use your finger to flip the page to the right, to find menu page you need. Remote control (Android version) requires the 'READ_EXTERNAL_STORAGE' permission to read a file from a local storage card. If the permission is already defined in the 'AndroidManifest.xml' file, then your xml files can be stored on the external storage card of your smart phone. If you want to run the remote control under Windows there is also an older version of remote control (prjRemote.exe) that you can download.



Milestone 2: Give a demo of your component. (15 points for CS1631) The demo is similar to the demo you give at the first milestone, except that the details of the application of your component should be demonstrated. For those working on Android app for smart phones, you may combine the Input Processor and Voting Software components into one Android program. You can then follow the phone to phone scenario to demonstrate your project. For those working on phone to PC system, if you have not successfully implemented the Input Processor to transform incoming phone call into CastVote message 701, you can still use the remote control to give the demo following the phone to PC scenario. You should pre-store the messages (as XML documents) so that you can do the demo quickly. You can also instantiate more than one remote control in your demo, in case you need them. The grading is 10 points for successful demo, 2 points for voter usability, 2 points for administrator usability and 1 point for security.

Note: The Android function for your smart phone to transform sms message into text message is probably described in: http://stackoverflow.com/questions/11435354/receiving-sms-on-android-app
If it is not in the above website, use Google to look for the appropriate function. Beware that different versions of Android may behave differently on different smart phones from different vendors. Sometimes permission from user may be needed. The following is the Android source code for requesting permission from user. You may need it if your Android sdk version is greater than 21.

        if (android.os.Build.VERSION.SDK_INT >=
android.os.Build.VERSION_CODES.M) {

            if
(checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) ==
PackageManager.PERMISSION_DENIED) {

                Log.d("permission", "permission denied to
ACCESS_FINE_LOCATION - requesting it");
                String[] permissions = {Manifest.permission.BLUETOOTH};
                requestPermissions(permissions, PERMISSION_REQUEST_CODE);
             }
        }



Rehearsal: (bonus points) If your group have successfully implemented the InputProcessor and VotingSoftware Components (or a combined component) for the Android app, you will be rehearsing to deal with the real voting events on CSDay.



Milestone 3: Based upon agile programming, give final demo of an integrated project involving two groups and at least one extra component (the GUI or the Trends Analyzer or both) and provide final report. You can also choose to use Ionic Framework to do cross-platform software development and port your app from one platform to another (20 points).


The extra componenent can be the GUI replacing the more primitive PrjRemote. The GUI can be used to test all types of administrative messages: 700, 701, 702 and new types of messages for Trends Analyzer, and to run test scripts based upon test-driven development (TDD). Minimally the GUI should be able to load a test script consisting of a sequence of messages (in XML format) and send the messages to the component(s) being tested.

The extra component can also be the Trends Analyzer that analyzes the voting trends of people with different interests, in different age group/education background/income group, etc. using a simple knowledge-base.

If two groups are working together on MS3, one group can take on the implementation and management of the extra component(s) and the other group can design the test scripts and do testing and measurements.

The final documentation is in the form of a zip file. When unzipped, it contains the following:

  • A Word file, which is your primary documentation. It contains the updated and enhanced documents that you submitted in Exercise 4 and previous milestones. The document thus consists of: a) enhanced project plan, b) updated UML diagrams, c) revised messages and variables, and d) a detailed example or test script with explanation and screen shots showing how your component works. (The last item is especially important in case Murphy's Law strikes again and your component does not work during the demo. At least you have something to show on paper.) The appendix of this document is the source codes, XML messages, PDF and/or WORD files.
  • The source codes. Yes, the source codes should be included both as an appendix in the report and also separately in a subdirectory Source.
  • updated PDF or WORD file for the updated UML diagrams.
  • A subdirectory Message containing the XML messages.
    Please name your zip file, WORD file, PDF file using the first five letters of your last name. For example, your name is Davenport. Then your zip file is daven.zip, your WORD file is daven.doc, your PDF file is daven.pdf. For team projects use one of the team member's name. You will lose 2 points if you do not follow this naming convention.