# Networked Graphics MV3500 Course Assignments using NetBeans

## Initialization and Refresh

To submit homework via NetBeans to the gitlab server you will first need to
use Git to clone a copy of the course repository at

* https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500

Use NetBeans to upload/update your homework assignments as follows:

1. *context menu:* **Git > Remote > Pull from Upstream** to first always ensure you update your repository
1. *Making sure:* Did you perform step one and pull git to refresh your local version?!
1. Select file of interest in NetBeans tab for Files
1. *context menu:* **Refactor/Rename** and take spaces out of file name (gets wacky on various operating systems, email etc.)
1. Ensure Java classes and source files start with your last name
1. *context menu:* **Run file**(s) to test 
1. *context menu:* **Git > commit**; provide comment documenting the change
1. Verify that the entry in Files tab goes from green to black, indicating you have committed to your local repository.
1. *context menu:* **Git > Remote > Push to Upstream**

## Adding and Editing Your Files

All MV3500 cohorts have source code collected under a common NetBeans project.

1. Find your current cohort src subdirectories, for example
    *  [assignments / src / MV3500Cohort2024JulySeptember](src/MV3500Cohort2024JulySeptember) (we are here!)
2. You can look at earlier cohort submissions, for example 
    *  [assignments / src / MV3500Cohort2023MarchJune](src/MV3500Cohort2023MarchJune)
    1. [assignments / src / MV3500Cohort2022MayJune](src/MV3500Cohort2022MayJune)
    1. [assignments / src / MV3500Cohort2021JulySeptember](src/MV3500Cohort2021JulySeptember)
    1. [assignments / src / MV3500Cohort2020JulySeptember](src/MV3500Cohort2020JulySeptember)
    2. [assignments / src / MV3500Cohort2019JulySeptember](src/MV3500Cohort2019JulySeptember)
    1. [assignments / src / MV3500Cohort2018JulySeptember](src/MV3500Cohort2018JulySeptember)
    2. [assignments / src / MV3500Cohort2018JanuaryMarch](src/MV3500Cohort2018JanuaryMarch)
3. Locate the correct subdirectory (for example [**homework1**](src/MV3500Cohort2023MarchJune/homework1)) to put your files.
4. Name all of your files starting with your last name, e.g. **LastnameProgram.java** **LastnameScreenshot.png** etc.
5. Be sure that names match for **LastnameProgram.java** and the class name, i.e. **public class LastnameJava**
6. Be sure to start each .java source file with correct package name, for example:
   * package MV3500Cohort2022MayJune.homework1;
   * package MV3500Cohort2022MayJune.homework2; etc.
7. Add a copy of **package-info.java** file to your directory. If you use NetBeans to copy, then it helpfully performs a rename refactoring and the file's package name is correct.
8. Check the javadoc by going to [build.xml](build.xml) and running target **javadoc.custom**
9. Be sure to Commit (with description) and Push Upstream, as discussed above.

After committing and pushing, you can now verify that your files are been shared by checking the website:

* https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/assignments/src/MV3500Cohort2024JulySeptember

**Clarity is key.** Good practices
* Note your changes in a **README.md** file.
* For nontrivial projects, you will also need to add a UML flow diagram and a UML timing sequence diagram.
* Visio has templates for UML diagrams, drawings with another tool or hand sketches are fine.  

## References

* [NetBeans](http://www.netbeans.org) and [Using Git Support](https://netbeans.apache.org/kb/docs/ide/git.html) with [tutorial video, version 8.2](https://www.youtube.com/watch?v=rs3QSq5hNf4)
* [GitLab Flavored Markdown (GFM)](https://docs.gitlab.com/ee/user/markdown.html) and [Markdown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet)
* UML [Sequence diagram](https://en.wikipedia.org/wiki/Sequence_diagram) on Wikipedia
* [Wireshark](https://www.wireshark.org) network protocol analyzer