Skip to main content Skip to local navigation
Home » Category: 'java'

java

jUnit 6, part 3: parametric testing external file

Building on the second post on jUnit 6, here is a parametric unit test set up with an external CSV file: This file, test values.csv, has comments and a header line that is to be ignored. It can be included in an IntelliJ project. We assume that a Calculator class is available that contains an […]

jUnit 6, part 2: parametric testing with delimiters and comments

I started examining jUnit 6 in an earlier post. It turns out that in jUnit6, the common separated values data can use delimiters other than commas. Very cool. Before getting into the import of CSV files for testing, let's look at two features that are useful for setting up a bank of tests. We'll assume […]

jUnit 6: unit testing in Java

This past year has seen the release of an update to jUnit, arguably the most important testing framework in software engineering and computer science. Now in its sixth release, jUnit makes a significant jump to eliminating support in anything before Java 17. When I got started with Java in 2020 most of the teaching material […]

jMusic videos

Here are a few videos that relate to Java Music (jMusic) in EECS 1021: Intro to jMusic: Intro to jMusic in Windows 11: Inheritance: Polymorphism: Combining User Input with jMusic:

Some useful things to do with Arduino, Firmata and Java

When contemplating how to use Firmata with Java, consider some of the following things: Your Main Project will look something like this (this is an older video that doesn't quite reflect changes to the updated project): Install Firmata on your device To do any of this you'll need to install Firmata: Using the OLED display […]

Firmata4j: "Index out of bounds"

If you're trying to use Firmata4j and get an Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 4 out of bounds for length 0 message, it may be because you downloaded StandardFirmata via the Arduino 2.0 IDE. At this stage, I'm not sure of the cause. I've determined that a solution for this is to use the […]

EECS 1011 and 1021 Lab Kit (2025/26 version)

[as of May 21, 2025, this is a public draft] This kit is updated from 2024/25 edition of the kit with three new sensors, one extra actuator, an extra cable and "crib sheets" for Matlab and Java. The lab kit for the two courses include the following list of items We'll be asking the Bookstore […]

Basic Graphics and Graphs with Princeton's Java StdLib

I really like the Princeton StdLib for Java to make basic graphs with Java. The learning curve isn't steep and installation is easy. To get started either grab the Maven support files or the JAR and install in IntelliJ or your favourite IDE. Here's an example to draw some basic shapes on the screen. Now, […]

Version 2.3.9 of Firmata4j

Summary to installing Firmata4j for Java projects in EECS 1021: Either one should work fine, but the 2.3.9 version should operate a little more cleanly. When using Maven to load the Firmata4j library you'll can only use up to version 2.3.8 and you'll need to load dependencies in a particular order, as per my earlier […]

Plagiarism detection for program source code

Detecting copied source code in student assignments is important. Here, I'll explore a few options that are possible for instructors here at York University, but these options may also work for instructors elsewhere. Look, there are a few notable reasons why copied source code will appear in a student's assignment: Given the convenience of the […]