https://github.com/grahammitchell/aplus-renamer
Renames A+ Computer Science source code files to be unique.
https://github.com/grahammitchell/aplus-renamer
Last synced: about 1 year ago
JSON representation
Renames A+ Computer Science source code files to be unique.
- Host: GitHub
- URL: https://github.com/grahammitchell/aplus-renamer
- Owner: grahammitchell
- License: apache-2.0
- Created: 2017-06-26T01:13:25.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-26T01:46:37.000Z (almost 9 years ago)
- Last Synced: 2025-02-15T07:51:22.345Z (over 1 year ago)
- Language: Java
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aplus-renamer
Renames A+ Computer Science source code files to be unique.
In my classroom, I used a few assignments from Stacey Armstrong's excellent
[A+ Computer Science](https://www.apluscompsci.com/ap_a_computer_science.htm) curriculum to help prepare them for the AP CS A exam.
(My district was already paying for a site license.)
However, my grading system required all filenames to be unique. And sometimes he would have files with the same name in
different chapters.
This program renames the files in a single folder and also edits the files themselves to update the references.
For example, assume that in chapter 11 there are files named `Triangle.java` and `TriangleRunner.java`:
```
// Triangle.java
public class Triangle {
private int b, h;
public Triangle() {
this.b = this.h = 0;
}
public Triangle(int b, int h) {
this.b = b;
this.h = h;
}
// etc.
}
```
...and its associated driver file:
```
// TriangleRunner.java
public class TriangleRunner {
Triangle test = new Triangle(6,7);
test.foo();
// etc.
}
```
My program renames `Triangle.java` to `Aplus11Triangle.java`, renames `TriangleRunner.java` to `Aplus11TriangleRunner.java`, and modifies the files like so:
```
// Aplus11Triangle.java
public class Aplus11Triangle {
private int b, h;
public Aplus11Triangle() {
this.b = this.h = 0;
}
public Aplus11Triangle(int b, int h) {
this.b = b;
this.h = h;
}
// etc.
}
// Aplus11TriangleRunner.java
public class Aplus11TriangleRunner {
Aplus11Triangle test = new Aplus11Triangle(6,7);
test.foo();
// etc.
}
```
Anyway, it has saved me a lot of time over the years.
-Graham