$30 off During Our Annual Pro Sale. View Details »

CSE563 Lecture 07

CSE563 Lecture 07

Software Requirements and Specification
Assignment Review
(202202)

Javier Gonzalez-Sanchez
PRO

August 22, 2021
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs
    CSE 563
    Software Requirements and Specification
    Lecture 07: Assignment Review
    Dr. Javier Gonzalez-Sanchez
    [email protected]
    javiergs.engineering.asu.edu | javiergs.com
    PERALTA 230U
    Office Hours: By appointment

    View Slide

  2. jgs
    Fall 2021 | 00000111
    The Questions
    §Is INVEST?
    §Is a Functional Requirement or an Activity?

    View Slide

  3. jgs
    Fall 2021 | 00000111
    Verbs (& subject)
    (actions)
    Careful with adjectives
    Functionality: Services, behavior, reaction

    View Slide

  4. jgs
    Fall 2021 | 00000111
    A well-formatted
    sentence with context
    A Verb
    or an
    adjective
    Actor(s)
    Requirement:
    • Is it I.N.V.E. .T. ?
    • Is it Small but it is a composition of more than one activity?
    (it is NOT too small)

    View Slide

  5. jgs
    Fall 2021 | 00000111
    INVEST in good requirements
    § Independent – loosely coupled with one another
    § Negotiable – Stories are what and why , not how ( 99% ).
    § Valuable – for the customer!
    § Estimatable – Effort/Cost of design, build, and test.
    § Small (sized appropriately)
    § Testable – pass or fail

    View Slide

  6. jgs
    Fall 2021 | 00000111
    Requirements
    Main Title: name of the system
    Heading: name for a requirement
    (service, behavior, or reaction)
    (a sentence with subject and verb and
    small context as you consider necessary
    for a header)
    Paragraphs: the explanation of the requirement
    (do not mix ideas)
    (focus in the goal of the section)
    You can list here the activities, algorithm, details, etc.
    (using bullets is a good idea)
    1
    2
    3

    View Slide

  7. jgs
    Case Study

    View Slide

  8. jgs
    Fall 2021 | 00000111
    User Interface
    § A GUI with a menu bar
    (Use a JMenu)
    § Two items: File and
    About
    § About is Easy, will
    open a dialog box
    with your team
    information.
    § File menu is the
    important one
    Jmenu Tutorial
    https://docs.oracle.com/javase/tutorial/uiswing/components/menu.html

    View Slide

  9. jgs
    Fall 2021 | 00000111
    File Menu
    Main functionalities:
    • Load a roster
    • Add attendance
    • Save
    • Plot Data

    View Slide

  10. jgs
    Fall 2021 | 00000111
    Load a Roster
    • Ask the user for a
    File path (Use a
    JFileChooser)
    • The file will be a
    CSV (Comma Separated
    Values) file.
    • Read the file and
    load the data into a
    data structure (your
    choice)
    JFileChooser Tutorial:
    https://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html
    How to Read CSV File in Java
    https://www.tutorialspoint.com/how-to-read-the-data-from-a-csv-file-in-java

    View Slide

  11. jgs
    Fall 2021 | 00000111
    Roster File
    /
    /
    /
    • The file does not
    have headers (orange
    line). Added only as
    a reference.
    • 6 fields per row

    View Slide

  12. jgs
    Fall 2021 | 00000111
    Load a Roster
    • Once the data is
    loaded, visualize it
    on the screen using a
    Jtable
    • Add your JTable in a
    JScrollPane, you will
    need scrollbars, both
    horizontal and
    vertical
    Jtable Tutorial
    https://www.javatpoint.com/java-jtable
    Dinamically Updating a JTable
    https://stackoverflow.com/questions/24918884/dynamically-updating-jtable

    View Slide

  13. jgs
    Fall 2021 | 00000111
    Add Attendance
    • Ask the user for a File
    path (Use a
    JFileChooser)
    • The file is another CSV
    (Comma Separated Values)
    file.
    • Ask for a date Use a
    Date Picker. Get One or
    create one
    • Read the file and load
    the data into a data
    structure (one more
    time, your choice)
    • Remember the selected
    date

    View Slide

  14. jgs
    Fall 2021 | 00000111
    Attendance File
    • Same asurite can appear
    in more than one row.
    For instance, a user is
    connected 20 minutes, go
    and then connect another
    20 minutes. It will
    appear as
    jdoe 20
    jdoe 20
    Merge them in one. And
    add the minutes. For
    instance:
    jdoe 40
    75
    time
    ASURITE
    javiergs
    • The file does not have
    headers (orange line).
    Added only as a
    reference.
    • 2 fields per row:
    • ASURITE (your username
    in the email)
    • An integer number that
    represent how many
    minutes you where
    connected in a meeting

    View Slide

  15. jgs
    Fall 2021 | 00000111
    Roster + Attendance
    • Using the asurite field
    as a reference, mix the
    roster data and the
    attendance data
    • Visualize the
    attendance data
    adding a column to
    the JTable. The
    header for the column
    is the date that the
    user provided
    • Any attendee that is
    not in the roster is
    ignored. But report
    it to the user. Use
    an option of JDialog

    View Slide

  16. jgs
    Fall 2021 | 00000111
    Roster + Attendance *
    • N Attendance Files
    can be loaded for the
    same Roster File.
    Each one add a new
    column

    View Slide

  17. jgs
    Fall 2021 | 00000111
    Save
    • Save all data
    (exactly what we have
    in the JTable) in a
    CSV file
    • For this file, save
    the headers also.

    View Slide

  18. jgs
    Fall 2021 | 00000111
    Plot Data
    • Create a Chart using the
    attendance data per
    student. Specifically, a
    Scatter Plot where
    • Y-Axis is how many
    students (from 0 to
    total row in the table)
    • X-axis is % of
    attendance (0%, 10% ..
    90%, 100%). 100% is 75
    minutes or more.
    • And each attendance
    column represent a
    population.

    View Slide

  19. jgs
    Fall 2021 | 00000111
    Plot Data
    • Either add a new JPanel,
    replace the JTable, Use
    a tab (JTabbedPane) or a
    dialog box
    • Use the JFreeChart
    library. Mandatory.
    Tutorial:
    https://www.javatpoint.com/jfreechart-scatter-chart

    View Slide

  20. jgs
    Test Yourselves

    View Slide

  21. jgs
    Fall 2021 | 00000111
    Case 1
    § The User Shall be Presented with a Main Menu Bar to Interact with the
    System
    § The User Shall be Able to View the Team Details
    § The User Shall be Able to Load the Roster Data Into the System
    § The User Shall be Able to Add the Class Attendance Information for a
    Specific Date
    § The User Shall be Able to Export the Roster Data
    § The User Shall be Able to View the Roster Data

    View Slide

  22. jgs
    Fall 2021 | 00000111
    Case 2
    § The system should have a GUI containing a menu bar with 2 options: "File",
    and "About"
    § The user should have an option to load a roster by selecting a file.
    § The system should display a dialogue box to show a confirmation message
    that the data was loaded.
    § The user should have an option to add attendance to the roster.
    § The user should have an option to save the generated table.
    § The user should have an option to plot to scatter graph using generated
    table data.
    § The user should be able to view team information.

    View Slide

  23. jgs
    Fall 2021 | 00000111
    Case 3
    § The user should be able to upload a file.
    § The system should load the roster file according to the schema.
    § The system should load the attendance file according to the data schema.
    § The user must be able to upload multiple attendance files.
    § Implement a date picker to select dates when uploading an attendance file.
    § The system handles duplicates in the attendance file.
    § Attendance must be aggregated to show as a visual dashboard.
    § The system should be able to show multiple dates in the plot.
    § The system should be able to save the data with attendance to a file.
    § Add both horizontal and vertical scrolling to the table UI.

    View Slide

  24. jgs
    Fall 2021 | 00000111
    Case 4
    § A menu bar containing two items “file” and “about”.
    § A dropdown for menu item “file”.
    § Reading CSV file containing details on attendees enrolled in the class.
    § Display the content of the file in a tabular manner that is scrollable.
    § Reading CSV for attendance with the date.
    § Combining all the time for an attendee who was on the call. (i.e., attendee
    leaving and joining call).
    § Pop-up dialogue containing the profile name and minutes of the meeting for
    attendees without a registered student ID.
    § Add new dates as columns containing attendees’ minutes in class.
    § Save the generated table as CSV.
    § Plot graph for the table with X-Axis with attendance percentage in class and
    Y-Axis with the number of students.
    § Display the plotted graph as a pop-up dialogue box.
    § The menu item “About” shows the developer’s info.

    View Slide

  25. jgs
    Fall 2021 | 00000111
    Case 5
    § Requirement 1: Create a GUI with 2 options in the menu bar
    § Requirement 2: Provide functionality to both the File section and About
    section
    § Requirement 3: Provide functionality to Load a Roster submenu option
    § Requirement 4: Provide functionality to Add Attendance submenu option
    § Requirement 5: Provide functionality to the Save submenu option
    § Requirement 6: Provide functionality to the Plot Data submenu option

    View Slide

  26. jgs
    Fall 2021 | 00000111
    Case 6
    § Menu Module
    § Load Roster
    § Attendance Module
    § Save Data
    § Plot Graph

    View Slide

  27. jgs
    Fall 2021 | 00000111
    Case 7 (part A)
    § Should have a GUI with a menu bar consisting of items ‘about’ and ‘files’
    where the file item is a dropdown of ‘load a roster’, ‘add attendance’, ‘save’,
    and ‘plot data’ sub-menu items.
    § When clicking on the ‘about’ item in the menu bar, the system should open
    a dialog box with information about all team members.
    § When clicking on the ‘Load a Roster’ sub-menu item, the system should
    show a GUI to take a CSV file as user input and read the file and store the
    data.
    § Show the roster data on GUI in table format.
    § When clicking on the ‘Add Attendance’ sub-menu item, ask the user to load
    an attendance CSV file using GUI and store the data.

    View Slide

  28. jgs
    Fall 2021 | 00000111
    Case 7 (part B)
    § Show the attendance data on GUI in table format with merging attendance
    of duplicate ASURITE.
    § Should take user input of date and merge the attendance to the roster for
    that date and display the merged data on GUI in the form of a table.
    § When the roster and attendee’s merged data is displayed, show a dialog
    box with a message telling how many students from the roster attended &
    attendance details of students who attended but weren't on the roster.
    § When a user clicks on save in the sub-menu item, the system should
    generate a CSV file of the merged roster and attendance data and save the
    file.
    § When a user clicks on the plot data sub-menu item, the system should
    show a scatter graph of attendance percentage on the number of students
    versus the date on GUI.

    View Slide

  29. jgs
    Fall 2021 | 00000111
    Case 8
    § The user should be able to upload a file.
    § To read the file.
    § To load the file.
    § The user should be asked for a date.
    § The user should be able to pick a date.
    § Based on ASURITE update how many minutes the user is connected to the
    meeting.
    § Merge duplicate attendance rows.
    § Merge Roster and Attendance data using ASURITE. Any attendee not on the
    Roster is ignored.
    § User-desired attendance files can be loaded for the same Roster file.
    § Elimination of duplicate entries in the Attendance file. (It is the functional
    requirement)
    § To save all the data. (Functionality available in save menu)
    § Creating a chart using the attendance data. (Explanation: Here Scatter plot
    is the service that plots the data)

    View Slide

  30. jgs
    Fall 2021 | 00000111
    Case 9
    § User should be able to load the roster to the screen in the form of a table
    from a CSV file path to a roster file.
    § User should be able to upload attendance data to system from any number
    of provided CSV file paths to attendance files and corresponding dates.
    § System should update roster display to reflect uploaded and processed
    attendance data.
    § User should be able to save all data on table interface into CSV files
    including headers.
    § User can plot attendance data from system into scatter plot where x is
    percentage of attendance and y is number of students.
    § System should display team information.

    View Slide

  31. jgs
    Fall 2021 | 00000111
    Case 10
    § The system provides GUI with a menu bar on the main page
    § Menu bar shows an item ”File”
    § Menu bar shows the item “About”
    § Users must be able to view the information of the team
    § Users must be able to load a roaster
    § Users must be able to add attendance
    § Users must be able to save the data into a csv file
    § Users must be able to plot the attendance data

    View Slide

  32. jgs
    Bonus
    Assignment (Pac-Man)
    Errors

    View Slide

  33. jgs
    Fall 2021 | 00000111
    Your Assignment

    View Slide

  34. jgs
    Fall 2021 | 00000111
    Your Assignment

    View Slide

  35. jgs
    Fall 2021 | 00000111
    Your Assignment

    View Slide

  36. jgs
    Bonus
    Assignment (Pac-Man)
    Solution

    View Slide

  37. jgs
    Fall 2021 | 00000111
    Storyboarding
    § Who?
    Identify all the roles available
    (personas)
    § What?
    Draft “a day in the life of…”
    Think about What? And What if?
    § Why?
    Value proposition
    Storyboard
    (describe a journey)

    View Slide

  38. jgs
    Fall 2021 | 00000111
    Let’s Work

    View Slide

  39. jgs
    Fall 2021 | 00000111
    Some Ideas. It is NOT a Complete List
    MOVE
    EAT
    SHOW
    DETECT
    COLLISION
    MOVE/
    HUNT
    SHOW
    SHOW/
    CREATE
    SCORE
    HANDLING
    WINNER
    DETECTOR
    MOVE/
    HUNT

    View Slide

  40. jgs
    Fall 2021 | 00000111
    Questions

    View Slide

  41. jgs
    Fall 2021 | 00000111
    Homework
    Yes, it is still a homework to read:
    Requirements Engineering: A Roadmap
    Nuseibeh, Bashar, and Steve Easterbrook
    Proceedings of the Conference on the Future of Software Engineering
    2000

    View Slide

  42. jgs
    CSE 563 Software Requirements and Specification
    Javier Gonzalez-Sanchez, Ph.D.
    [email protected]
    Spring 2022
    Copyright. These slides can only be used as study material for the class CSE563 at ASU.
    They cannot be distributed or used for another purpose.

    View Slide