Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSE360 Tutorial 03

CSE360 Tutorial 03

Introduction to Software Engineering
Project
(202206)

Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. CSE 360
    Introduction to Software Engineering
    Project
    Dr. Javier Gonzalez-Sanchez
    [email protected]
    javiergs.engineering.asu.edu | javiergs.com
    PERALTA 230U
    Office Hours: By appointment

    View full-size slide

  2. Project Description

    View full-size slide

  3. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 3
    What to submit
    1. Team Project
    Source code in Java. All classes in the default
    package, i.e., no package instruction used.
    Use only Java AWT, Java Swing
    Only one external library allowed: JFreeChart

    View full-size slide

  4. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 4
    What to submit
    2. Project Report
    • Class diagram. It is not an adornment. It should match 100%
    with the source code: association, aggregation, composition,
    realization, generalization.
    • Screenshot(s) of your project running.

    View full-size slide

  5. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 5
    Alert
    Talk with your team about expectations before start working. Review
    carefully if your team expectations match what you are able to / want
    to do. Including:
    getting an A+ vs I am ok with a C-,
    morning vs night people
    etc., etc., etc.

    View full-size slide

  6. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 6
    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 full-size slide

  7. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 7
    File Menu
    Main functionalities:
    • Load a roster
    • Add attendance
    • Save
    • Plot Data

    View full-size slide

  8. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 8
    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 full-size slide

  9. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 9
    Roster File
    /
    /
    /
    • The file does not
    have headers (orange
    line). Added only as
    a reference.
    • 6 fields per row

    View full-size slide

  10. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 10
    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 full-size slide

  11. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 11
    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 full-size slide

  12. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 12
    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 full-size slide

  13. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 13
    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 full-size slide

  14. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 14
    Roster + Attendance *
    • N Attendance Files
    can be loaded for the
    same Roster File.
    Each one add a new
    column

    View full-size slide

  15. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 15
    Save
    • Save all data
    (exactly what we have
    in the JTable) in a
    CSV file
    • For this file, save
    the headers also.

    View full-size slide

  16. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 16
    Plot Data
    • Create a Chart using the
    attendance data per
    student. Specifically, a
    Scatter Plot were
    • 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 full-size slide

  17. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 17
    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 full-size slide

  18. Javier Gonzalez-Sanchez | CSE360 | Fall 2020 | 18
    Questions

    View full-size slide

  19. CSE360 – Introduction to Software Engineering
    Javier Gonzalez-Sanchez
    [email protected]
    Summer 2022
    Disclaimer. These slides can only be used as study material for the class CSE360 at ASU. They cannot be distributed or used for another purpose.

    View full-size slide