Giter Site home page Giter Site logo

ubcx-software-construction / intro-to-softconst-lecture-starters Goto Github PK

View Code? Open in Web Editor NEW
26.0 7.0 103.0 29 KB

This repository contains Java projects which accompany the videos for Intro to Software Construction in SoftConst1x: Data Abstraction

Java 95.40% Shell 4.60%

intro-to-softconst-lecture-starters's Introduction

Running Your Files

We've set up the project structure for you, so once you download the files, you should be able to run each project and its tests individually! And now we have step-by-step guides on how to run tests or a main() method.

Set up your tests | Detailed Troubleshooting | Run main methods

IMPORTANT

Opening Files

You MUST not open an individual project, or bad things might happen! We are not responsible for what may ensue in the event that you disobey. (Just kidding - make a post about it on the discussion board if you do run into problems.) That is to say, open the project with the same name as the GitHub repo.

the correct way to open vs incorrect

"Do you want to add [...] to version control/Git/svn?"

Short answer: probably not

Long answer: Our repositories should have .gitignore files, which should prevent you from committing unwanted residue of your workspace specific to your machine (e.g. workspace.xml, .idea folder). Of course, you're free to add these files to git if you want, since you'll probably only be pushing and pulling to your own repositories for this course. However, it's better practice to leave your git repos clean and free of version- or machine-specific information.

Test Configurations

The Hell-for-Leather overview

Test config gif



DETAILED TROUBLESHOOTING

  1. Open your project in IntelliJ. (Don't be afraid of the vintage 15.0.2 edition used in these screenshots!)

Opened project


  1. If the Project Structure sidebar doesn't open automatically, just click the sideways 1. Project button at the far left. If the 1. Project button does not appear at all, just press โŒ˜ + 1 on macOS, or Ctrl + 1 on Windows.

Opened project with side Project bar also open


  1. Go to the top right, and click the greyed-out down-facing triangle. Edit Configurations will appear. Click on it.

Selecting "Edit Configurations"


  1. Pour yourself a cup of coffee.
    • This step is optional, but it definitely helps me feel like a programmer.


  1. A new window! Click the green plus and select JUnit from the dropdown.

Edit configurations with dropdown open


  1. Now you'll get this window with some red error messages.

Add JUnit application window with no info entered


  1. Go to "Use classpath of module" and select the module you want to test. For me in this tutorial, I'm working on Band, so let's choose that.

Use classpath of module selection


  1. Then, go up to "Class".

Class field selected


  1. Choose the class wherein the tests live.

Choosing test class


  1. Alternatively, you can change the Test Kind field from "Class" to "All in directory". That way you can specify the entire test folder to be run at once.

All in directory selected


  1. Here's what it looked like once I configured the tests for each project.

All configured


  1. Once you're done, hit Apply or Ok. Now you can run your tests with the little green triangle! When you want to switch test suites, just click on the same drop-down (that once was an upside-down triange and now has a name) and select your desired test suite.

dropdown


Done!

Done


Running main

If your project has a main directory and/or Main class, you'll be able to run the main() program.

  1. Right-click on the Main class and click on Run Main.main() or some variant of it.

Clicking on Main and selection Run Main.main()


  1. A console window should pop up. You're able to type into it and give input.

Showing console

You can also now run it by selecting Main and hitting the green arrow at the top.

intro-to-softconst-lecture-starters's People

Contributors

jyoo980 avatar ubcx-software-construction avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.