assignment 1
This commit is contained in:
32
.gitignore
vendored
Normal file
32
.gitignore
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
### IntelliJ IDEA ###
|
||||
out/
|
||||
!**/src/main/**/out/
|
||||
!**/src/test/**/out/
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
bin/
|
||||
!**/src/main/**/bin/
|
||||
!**/src/test/**/bin/
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
||||
|
||||
# zips
|
||||
zips/**/*.zip
|
||||
3
.idea/.gitignore
generated
vendored
Normal file
3
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
6
.idea/misc.xml
generated
Normal file
6
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_20" default="true" project-jdk-name="20" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/COMP210.iml" filepath="$PROJECT_DIR$/COMP210.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
11
COMP210.iml
Normal file
11
COMP210.iml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
15
Justfile
Normal file
15
Justfile
Normal file
@@ -0,0 +1,15 @@
|
||||
default: run
|
||||
|
||||
run file=(`find src -type f -printf '%T@ %p\n' | sort -n | cut -d " " -f 2- | tail -1`):
|
||||
java {{file}}
|
||||
|
||||
all:
|
||||
for file in `find src -type f -printf '%T@ %p\n' | sort -n | cut -d " " -f 2-`; do just run $file; done
|
||||
|
||||
zip folder=(`find src -type d -printf '%T@ %p\n' | sort -n | cut -d' ' -f 2- | sed 's/src\///' | head -n -1 | tail -1`):
|
||||
rm -rf ./zips/{{folder}}.zip
|
||||
zip -r ./zips/{{folder}}.zip ./src/{{folder}}
|
||||
|
||||
alias r := run
|
||||
alias a := all
|
||||
alias z := zip
|
||||
7
src/assn01/HelloWorld.java
Normal file
7
src/assn01/HelloWorld.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package assn01;
|
||||
|
||||
public class HelloWorld {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello, World");
|
||||
}
|
||||
}
|
||||
21
src/assn01/Part2.java
Normal file
21
src/assn01/Part2.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package assn01;
|
||||
|
||||
public class Part2 {
|
||||
public static void main(String[] args) {
|
||||
short sh = 32767;
|
||||
|
||||
assn01.Part2.method2();
|
||||
}
|
||||
|
||||
public static void method2() {
|
||||
int n2 = 0xABC;
|
||||
|
||||
assn01.Part2.method3();
|
||||
}
|
||||
|
||||
public static void method3() {
|
||||
int[] a3 = { 'a', 'z' };
|
||||
|
||||
System.out.println(a3[0] + " " + a3[1]);
|
||||
}
|
||||
}
|
||||
7
src/hello/HelloWorld.java
Normal file
7
src/hello/HelloWorld.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package hello;
|
||||
|
||||
public class HelloWorld {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello, World");
|
||||
}
|
||||
}
|
||||
0
zips/.gitkeep
Normal file
0
zips/.gitkeep
Normal file
Reference in New Issue
Block a user