Skip to content

Assignment 1: A (Java) software engineers toolbox

License

Notifications You must be signed in to change notification settings

MoeQuadrat/01-tools

 
 

Repository files navigation

This is an assignment to the class Advanced Programming at the University of Applied Sciences Rosenheim.

Assignment 1: A (Java) software engineers toolbox

Get familiar with Git

  1. Familiarize yourself with git by completing this interactive tutorial in your browser.
  2. Install git on your machine.
    • Mac: Open Terminal.app and install the Apple Developer Tools by executing xcode-select --install.
    • Linux: Use your distribution's package manager to install git; on Ubuntu, you'll run something like
       $ sudo apt-get update
       $ sudo apt-get install git
    • Windows: Download and install the Windows installation package; make sure to install (and use) git bash.
  3. Try git in the real world - use Github:
    • Sign in or create an account on Github (it's free, and you should already have one...).
    • Create a new repository (note: with a free account, your're limited to public repos); select Initialize this repository with a README to add a README.md file.
    • On your computer, clone your new repository, edit the README.md to your choice, using the Github markdown cheatsheet.
    • Add/stage and commit the changes, and push them to your repository.
    • Create and switch to a new branch (eg. feature/add-license), and add a file LICENSE to it, containing the MIT open source software license. For a real project, you may want to chose a different license (read more about licenses here: https://opensource.org/licenses). But this is actually a different story.
    • Push the branch; you should now be able to see it on Github.
    • On Github, create a pull request and merge it to master.
    • Back on your computer, checkout master, and pull the changes to update your local copy.

Note: Since you'll be working on assignments together, it's a good idea to fork the official assignment repository, add your friend as a collaborator, and take it from there!

You should now know what it means if someone asks you: Can you please merge my PR into your master branch?

Get familiar with Gradle

  1. Install the Gradle build tool; make sure you have a recent Java JDK installed and configured for command line use.
  2. Familiarize yourself by completing the Java application tutorial. Note: This requires a command line shell, such as bash. If you're running Windows, you can use Powershell, Cmd or git's bash. In case you have Linux subsystem installed on Windows, you could try to use this.

Note: Using the gradle wrapper is generally advised.

You should now know how to read a basic build.gradle file, and what gradle build means.

Get familiar with IntelliJ

  1. Make sure you have the latest IntelliJ IDEA installed (it's free for educational use!). Ideally, you pick the Community Edition which is free anyway.
  2. On first launch, you may have to configure the default project structure and check your installed/configured JDKs: Configure default project structure Verify installed/configured JDKs Check default JDK for projects You may also have to configure the location of Gradle, if not automatically configured.
  3. Select Check out from Version Control: git and provide the repository URL; note that you can use either https://hsro-inf-... (and provide your Github username and password), or [email protected]:hsro-inf-... (with SSH credentials as configured with Github). Check out from VCS
  4. After checkout, it may take a while for Gradle to build and index the project.
  5. Look at the project's build.gradle and see how it configures for the use of JUnit 5.
  6. Look at the class fhro.inf.prg3.a01.MyExampleClass and read the javadoc comments. What is it's (very simple) purpopse?
  7. Look at the test class fhro.inf.prg3.a01.MyExampleClassTest and run the tests.
  8. Fix MyExampleClass so that all test cases pass.

Note: We will go into details with import static and @... later, but go ahead and google what they do!

For the future expert

The original repository has Tracis CI integration enabled (see .travis.yml). On each push event, it will run a build process, which includes executing all tests. If one test fails, the build fails, which can help prevent merging in bugs from other branches or forks.

About

Assignment 1: A (Java) software engineers toolbox

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%