diff --git a/bin/.DS_Store b/bin/.DS_Store new file mode 100644 index 00000000..44c6602f Binary files /dev/null and b/bin/.DS_Store differ diff --git a/bin/.classpath b/bin/.classpath new file mode 100644 index 00000000..51a8bbad --- /dev/null +++ b/bin/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 00000000..9fed9070 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,6 @@ +/Question1.class +/Question1Test.class +/Question2.class +/Question2Test.class +/Question3.class +/Question3Test.class diff --git a/bin/.project b/bin/.project new file mode 100644 index 00000000..a0132d45 --- /dev/null +++ b/bin/.project @@ -0,0 +1,17 @@ + + + homework5 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/bin/.settings/org.eclipse.jdt.core.prefs b/bin/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..3a215370 --- /dev/null +++ b/bin/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/bin/bin/.DS_Store b/bin/bin/.DS_Store new file mode 100644 index 00000000..001d2aba Binary files /dev/null and b/bin/bin/.DS_Store differ diff --git a/bin/src/.DS_Store b/bin/src/.DS_Store new file mode 100644 index 00000000..1f88b020 Binary files /dev/null and b/bin/src/.DS_Store differ diff --git a/bin/src/Simulation.class b/bin/src/Simulation.class new file mode 100644 index 00000000..8a542c26 Binary files /dev/null and b/bin/src/Simulation.class differ diff --git a/bin/src/edu/.DS_Store b/bin/src/edu/.DS_Store new file mode 100644 index 00000000..535b4697 Binary files /dev/null and b/bin/src/edu/.DS_Store differ diff --git a/bin/src/edu/nd/.DS_Store b/bin/src/edu/nd/.DS_Store new file mode 100644 index 00000000..5859ba1b Binary files /dev/null and b/bin/src/edu/nd/.DS_Store differ diff --git a/bin/src/edu/nd/se2018/.DS_Store b/bin/src/edu/nd/se2018/.DS_Store new file mode 100644 index 00000000..57a99912 Binary files /dev/null and b/bin/src/edu/nd/se2018/.DS_Store differ diff --git a/bin/src/edu/nd/se2018/homework/.DS_Store b/bin/src/edu/nd/se2018/homework/.DS_Store new file mode 100644 index 00000000..e4b5528a Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/.DS_Store differ diff --git a/bin/src/edu/nd/se2018/homework/hwk1/Question1.class b/bin/src/edu/nd/se2018/homework/hwk1/Question1.class new file mode 100644 index 00000000..f7b6e64b Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk1/Question1.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk1/Question1Test.class b/bin/src/edu/nd/se2018/homework/hwk1/Question1Test.class new file mode 100644 index 00000000..c387a8cc Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk1/Question1Test.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk1/Question2.class b/bin/src/edu/nd/se2018/homework/hwk1/Question2.class new file mode 100644 index 00000000..2984f018 Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk1/Question2.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk1/Question2Test.class b/bin/src/edu/nd/se2018/homework/hwk1/Question2Test.class new file mode 100644 index 00000000..e8b39fa1 Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk1/Question2Test.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk1/Question3.class b/bin/src/edu/nd/se2018/homework/hwk1/Question3.class new file mode 100644 index 00000000..98992c05 Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk1/Question3.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk1/Question3Test.class b/bin/src/edu/nd/se2018/homework/hwk1/Question3Test.class new file mode 100644 index 00000000..f2d7908c Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk1/Question3Test.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk2/.DS_Store b/bin/src/edu/nd/se2018/homework/hwk2/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk2/.DS_Store differ diff --git a/bin/src/edu/nd/se2018/homework/hwk2/EarlySprinter.class b/bin/src/edu/nd/se2018/homework/hwk2/EarlySprinter.class new file mode 100644 index 00000000..27460ad3 Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk2/EarlySprinter.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk2/Main.class b/bin/src/edu/nd/se2018/homework/hwk2/Main.class new file mode 100644 index 00000000..4d1bd0dd Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk2/Main.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk2/Strategy and Reflection b/bin/src/edu/nd/se2018/homework/hwk2/Strategy and Reflection new file mode 100644 index 00000000..5e5a8596 --- /dev/null +++ b/bin/src/edu/nd/se2018/homework/hwk2/Strategy and Reflection @@ -0,0 +1,15 @@ +Strategy and Reflection + +The strategy is set in horse, and is called through the setstrategy function that is present there. +This allowed for the set up to be cleaner in race where it was taking the input and you could create +the horse object simply. When setting that it is really just assigning it based on a case structure that +then runs in the horse class the "run" function that calls "moveForward" this is what is being implemented +in slowStarter.java, steadyRunner.java, and EarlySprinter.java. Move forward returns the jump that they make +in the unit of time. This seemed like a strait forward way to represent continuous time in a discrete +manner. This representation can also be better tuned easily by changing how many units represent 10 miles +and the size of the jumps or the speed that is used. This design decision made it so that the horse run function +out pass out to race, where using a map I was able to associate how much ground had been covered. + +Reflecting on this design I think I was happy with the build up into horses. I think building out a better version +of the hashmap that could have been used to sort or clean up the race in the event of ties. It would have helped +streamline my implementation and kept race easier to read. \ No newline at end of file diff --git a/bin/src/edu/nd/se2018/homework/hwk2/UML_Diagram_ConnorGreen.pptx b/bin/src/edu/nd/se2018/homework/hwk2/UML_Diagram_ConnorGreen.pptx new file mode 100644 index 00000000..0ff9d3c8 Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk2/UML_Diagram_ConnorGreen.pptx differ diff --git a/bin/src/edu/nd/se2018/homework/hwk2/horse.class b/bin/src/edu/nd/se2018/homework/hwk2/horse.class new file mode 100644 index 00000000..11c3a303 Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk2/horse.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk2/race.class b/bin/src/edu/nd/se2018/homework/hwk2/race.class new file mode 100644 index 00000000..0ed1a1d7 Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk2/race.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk2/raceTest.class b/bin/src/edu/nd/se2018/homework/hwk2/raceTest.class new file mode 100644 index 00000000..d95cfa54 Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk2/raceTest.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk2/raceTest2.class b/bin/src/edu/nd/se2018/homework/hwk2/raceTest2.class new file mode 100644 index 00000000..e0b66e39 Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk2/raceTest2.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk2/raceTest3.class b/bin/src/edu/nd/se2018/homework/hwk2/raceTest3.class new file mode 100644 index 00000000..4af252fb Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk2/raceTest3.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk2/raceTest4.class b/bin/src/edu/nd/se2018/homework/hwk2/raceTest4.class new file mode 100644 index 00000000..e23e6cd9 Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk2/raceTest4.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk2/slowStarter.class b/bin/src/edu/nd/se2018/homework/hwk2/slowStarter.class new file mode 100644 index 00000000..70bb1c70 Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk2/slowStarter.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk2/steadyRunner.class b/bin/src/edu/nd/se2018/homework/hwk2/steadyRunner.class new file mode 100644 index 00000000..e38cdfe8 Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk2/steadyRunner.class differ diff --git a/bin/src/edu/nd/se2018/homework/hwk2/strategy.class b/bin/src/edu/nd/se2018/homework/hwk2/strategy.class new file mode 100644 index 00000000..a4477d7c Binary files /dev/null and b/bin/src/edu/nd/se2018/homework/hwk2/strategy.class differ diff --git a/bin/src/model/infrastructure/Direction.class b/bin/src/model/infrastructure/Direction.class new file mode 100644 index 00000000..dfa8c074 Binary files /dev/null and b/bin/src/model/infrastructure/Direction.class differ diff --git a/bin/src/model/infrastructure/MapBuilder.class b/bin/src/model/infrastructure/MapBuilder.class new file mode 100644 index 00000000..fd3bb6ae Binary files /dev/null and b/bin/src/model/infrastructure/MapBuilder.class differ diff --git a/bin/src/model/infrastructure/RailwayTracks.class b/bin/src/model/infrastructure/RailwayTracks.class new file mode 100644 index 00000000..8b5815a9 Binary files /dev/null and b/bin/src/model/infrastructure/RailwayTracks.class differ diff --git a/bin/src/model/infrastructure/Road.class b/bin/src/model/infrastructure/Road.class new file mode 100644 index 00000000..b5d2ddcc Binary files /dev/null and b/bin/src/model/infrastructure/Road.class differ diff --git a/bin/src/model/infrastructure/gate/CrossingGate.class b/bin/src/model/infrastructure/gate/CrossingGate.class new file mode 100644 index 00000000..7fca9230 Binary files /dev/null and b/bin/src/model/infrastructure/gate/CrossingGate.class differ diff --git a/bin/src/model/infrastructure/gate/GateClosed.class b/bin/src/model/infrastructure/gate/GateClosed.class new file mode 100644 index 00000000..8fba0a11 Binary files /dev/null and b/bin/src/model/infrastructure/gate/GateClosed.class differ diff --git a/bin/src/model/infrastructure/gate/GateClosing.class b/bin/src/model/infrastructure/gate/GateClosing.class new file mode 100644 index 00000000..cc30f806 Binary files /dev/null and b/bin/src/model/infrastructure/gate/GateClosing.class differ diff --git a/bin/src/model/infrastructure/gate/GateOpen.class b/bin/src/model/infrastructure/gate/GateOpen.class new file mode 100644 index 00000000..c9b19892 Binary files /dev/null and b/bin/src/model/infrastructure/gate/GateOpen.class differ diff --git a/bin/src/model/infrastructure/gate/GateOpening.class b/bin/src/model/infrastructure/gate/GateOpening.class new file mode 100644 index 00000000..eb359b2a Binary files /dev/null and b/bin/src/model/infrastructure/gate/GateOpening.class differ diff --git a/bin/src/model/infrastructure/gate/IGateState.class b/bin/src/model/infrastructure/gate/IGateState.class new file mode 100644 index 00000000..bba59b62 Binary files /dev/null and b/bin/src/model/infrastructure/gate/IGateState.class differ diff --git a/bin/src/model/vehicles/Car.class b/bin/src/model/vehicles/Car.class new file mode 100644 index 00000000..8238e5fc Binary files /dev/null and b/bin/src/model/vehicles/Car.class differ diff --git a/bin/src/model/vehicles/CarFactory.class b/bin/src/model/vehicles/CarFactory.class new file mode 100644 index 00000000..e0e3be9b Binary files /dev/null and b/bin/src/model/vehicles/CarFactory.class differ diff --git a/bin/src/model/vehicles/IVehicle.class b/bin/src/model/vehicles/IVehicle.class new file mode 100644 index 00000000..20def24a Binary files /dev/null and b/bin/src/model/vehicles/IVehicle.class differ diff --git a/bin/src/model/vehicles/Train.class b/bin/src/model/vehicles/Train.class new file mode 100644 index 00000000..1142b086 Binary files /dev/null and b/bin/src/model/vehicles/Train.class differ diff --git a/bin/src/src/Simulation.class b/bin/src/src/Simulation.class new file mode 100644 index 00000000..b9e6ba3a Binary files /dev/null and b/bin/src/src/Simulation.class differ diff --git a/bin/src/view/CarImageSelector.class b/bin/src/view/CarImageSelector.class new file mode 100644 index 00000000..65c7ede4 Binary files /dev/null and b/bin/src/view/CarImageSelector.class differ diff --git a/bin/src/view/IDisplay.class b/bin/src/view/IDisplay.class new file mode 100644 index 00000000..73e3f8ba Binary files /dev/null and b/bin/src/view/IDisplay.class differ diff --git a/bin/src/view/MapDisplay.class b/bin/src/view/MapDisplay.class new file mode 100644 index 00000000..0847baa3 Binary files /dev/null and b/bin/src/view/MapDisplay.class differ diff --git a/bin/src/view/RoadDisplay.class b/bin/src/view/RoadDisplay.class new file mode 100644 index 00000000..ae47de64 Binary files /dev/null and b/bin/src/view/RoadDisplay.class differ diff --git a/bin/src/view/TracksDisplay.class b/bin/src/view/TracksDisplay.class new file mode 100644 index 00000000..239105a3 Binary files /dev/null and b/bin/src/view/TracksDisplay.class differ diff --git a/chip/textures/black.jpeg b/chip/textures/black.jpeg new file mode 100644 index 00000000..cf6b9a45 Binary files /dev/null and b/chip/textures/black.jpeg differ diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 00000000..da5c8b7d Binary files /dev/null and b/src/.DS_Store differ diff --git a/src/.classpath b/src/.classpath new file mode 100644 index 00000000..3f3893af --- /dev/null +++ b/src/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/.project b/src/.project new file mode 100644 index 00000000..0f6f6a76 --- /dev/null +++ b/src/.project @@ -0,0 +1,17 @@ + + + src + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/src/edu/.DS_Store b/src/edu/.DS_Store new file mode 100644 index 00000000..aaf95220 Binary files /dev/null and b/src/edu/.DS_Store differ diff --git a/src/edu/nd/.DS_Store b/src/edu/nd/.DS_Store new file mode 100644 index 00000000..e0e6e1eb Binary files /dev/null and b/src/edu/nd/.DS_Store differ diff --git a/src/edu/nd/sarec/.DS_Store b/src/edu/nd/sarec/.DS_Store new file mode 100644 index 00000000..b67485ce Binary files /dev/null and b/src/edu/nd/sarec/.DS_Store differ diff --git a/src/edu/nd/sarec/.classpath b/src/edu/nd/sarec/.classpath new file mode 100644 index 00000000..945d53d2 --- /dev/null +++ b/src/edu/nd/sarec/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/edu/nd/sarec/.project b/src/edu/nd/sarec/.project new file mode 100644 index 00000000..f26ab0f7 --- /dev/null +++ b/src/edu/nd/sarec/.project @@ -0,0 +1,17 @@ + + + sarec + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/src/edu/nd/sarec/railwaycrossing/.DS_Store b/src/edu/nd/sarec/railwaycrossing/.DS_Store new file mode 100644 index 00000000..001d2aba Binary files /dev/null and b/src/edu/nd/sarec/railwaycrossing/.DS_Store differ diff --git a/src/edu/nd/se2018/.DS_Store b/src/edu/nd/se2018/.DS_Store new file mode 100644 index 00000000..ae6dee09 Binary files /dev/null and b/src/edu/nd/se2018/.DS_Store differ diff --git a/src/edu/nd/se2018/.metadata/.lock b/src/edu/nd/se2018/.metadata/.lock new file mode 100644 index 00000000..e69de29b diff --git a/src/edu/nd/se2018/.metadata/.log b/src/edu/nd/se2018/.metadata/.log new file mode 100644 index 00000000..2895a054 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.log @@ -0,0 +1,99 @@ +!SESSION 2018-09-23 19:48:01.316 ----------------------------------------------- +eclipse.buildId=4.8.0.I20180611-0500 +java.version=1.8.0_181 +java.vendor=Oracle Corporation +BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US +Framework arguments: -product org.eclipse.epp.package.java.product -keyring /Users/connorgreen/.eclipse_keyring +Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.java.product -keyring /Users/connorgreen/.eclipse_keyring + +!ENTRY org.eclipse.core.net 1 0 2018-09-23 19:48:28.423 +!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences + +!ENTRY org.eclipse.egit.core 2 0 2018-09-23 19:48:28.500 +!MESSAGE Builtin LFS support not present/detected +!STACK 0 +java.lang.ClassNotFoundException: org.eclipse.jgit.lfs.BuiltinLFS cannot be found by org.eclipse.egit.core_5.0.0.201806131550-r + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:508) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at java.lang.Class.forName0(Native Method) + at java.lang.Class.forName(Class.java:264) + at org.eclipse.egit.core.Activator.registerBuiltinLFS(Activator.java:279) + at org.eclipse.egit.core.Activator.start(Activator.java:212) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:779) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) + at java.security.AccessController.doPrivileged(Native Method) + at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:772) + at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:729) + at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1002) + at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:354) + at org.eclipse.osgi.container.Module.doStart(Module.java:581) + at org.eclipse.osgi.container.Module.start(Module.java:449) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:114) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:505) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:392) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:454) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.egit.ui.Activator$RepositoryChangeScanner.(Activator.java:921) + at org.eclipse.egit.ui.Activator.setupRepoChangeScanner(Activator.java:1034) + at org.eclipse.egit.ui.Activator.start(Activator.java:336) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:779) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) + at java.security.AccessController.doPrivileged(Native Method) + at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:772) + at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:729) + at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1002) + at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:354) + at org.eclipse.osgi.container.Module.doStart(Module.java:581) + at org.eclipse.osgi.container.Module.start(Module.java:449) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:114) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:505) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:392) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:470) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:609) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:177) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:931) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:60) + at org.eclipse.ui.internal.services.WorkbenchServiceRegistry.getSourceProviders(WorkbenchServiceRegistry.java:174) + at org.eclipse.ui.internal.services.SourceProviderService.readRegistry(SourceProviderService.java:104) + at org.eclipse.ui.internal.Workbench$34.runWithException(Workbench.java:2378) + at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4860) + at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:95) + at org.eclipse.ui.internal.Workbench.initializeDefaultServices(Workbench.java:2373) + at org.eclipse.ui.internal.Workbench.init(Workbench.java:1654) + at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2859) + at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:654) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:597) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592) + at org.eclipse.equinox.launcher.Main.run(Main.java:1498) diff --git a/src/edu/nd/se2018/.metadata/.mylyn/.taskListIndex/segments_1 b/src/edu/nd/se2018/.metadata/.mylyn/.taskListIndex/segments_1 new file mode 100644 index 00000000..81250233 Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.mylyn/.taskListIndex/segments_1 differ diff --git a/src/edu/nd/se2018/.metadata/.mylyn/.taskListIndex/write.lock b/src/edu/nd/se2018/.metadata/.mylyn/.taskListIndex/write.lock new file mode 100644 index 00000000..e69de29b diff --git a/src/edu/nd/se2018/.metadata/.mylyn/repositories.xml.zip b/src/edu/nd/se2018/.metadata/.mylyn/repositories.xml.zip new file mode 100644 index 00000000..9694868b Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.mylyn/repositories.xml.zip differ diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version new file mode 100644 index 00000000..25cb955b --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index new file mode 100644 index 00000000..73feb1c5 Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version new file mode 100644 index 00000000..6b2aaa76 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree new file mode 100644 index 00000000..8a1fc9ec Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree differ diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources new file mode 100644 index 00000000..96f96118 Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..dffc6b51 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +version=1 diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..36bf22ae --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,7 @@ +content_assist_proposals_background=255,255,255 +content_assist_proposals_foreground=0,0,0 +eclipse.preferences.version=1 +org.eclipse.jdt.ui.formatterprofiles.version=14 +spelling_locale_initialized=true +useAnnotationsPrefPage=true +useQuickDiffPrefPage=true diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs new file mode 100644 index 00000000..67b1d96c --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.m2e.discovery.pref.projects= diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs new file mode 100644 index 00000000..43e97e40 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +mylyn.attention.migrated=true diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs new file mode 100644 index 00000000..8d462a6c --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs new file mode 100644 index 00000000..2b60c21d --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +migrated.task.repositories.secure.store=true +org.eclipse.mylyn.tasks.ui.filters.nonmatching=true +org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true +org.eclipse.mylyn.tasks.ui.welcome.message=true diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs new file mode 100644 index 00000000..61f3bb8b --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +overviewRuler_migration=migrated_3.1 diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs new file mode 100644 index 00000000..0f9f16c3 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -0,0 +1,5 @@ +PROBLEMS_FILTERS_MIGRATE=true +eclipse.preferences.version=1 +platformState=1536544865213 +quickStart=false +tipsAndTricks=false diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs new file mode 100644 index 00000000..aa3dc029 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs @@ -0,0 +1,3 @@ +//org.eclipse.ui.commands/state/org.eclipse.ui.navigator.resources.nested.changeProjectPresentation/org.eclipse.ui.commands.radioState=false +PLUGINS_NOT_ACTIVATED_ON_STARTUP=;org.eclipse.m2e.discovery; +eclipse.preferences.version=1 diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi new file mode 100644 index 00000000..07e03f5b --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi @@ -0,0 +1,2880 @@ + + + + activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration + ModelMigrationProcessor.001 + + + + + + + + topLevel + + + Minimized + MinimizedByZoom + + + persp.actionSet:org.eclipse.mylyn.doc.actionSet + persp.actionSet:org.eclipse.mylyn.tasks.ui.navigation + persp.actionSet:org.eclipse.ui.cheatsheets.actionSet + persp.actionSet:org.eclipse.search.searchActionSet + persp.actionSet:org.eclipse.ui.edit.text.actionSet.annotationNavigation + persp.actionSet:org.eclipse.ui.edit.text.actionSet.navigation + persp.actionSet:org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo + persp.actionSet:org.eclipse.ui.externaltools.ExternalToolsSet + persp.actionSet:org.eclipse.ui.actionSet.keyBindings + persp.actionSet:org.eclipse.ui.actionSet.openFiles + persp.actionSet:org.eclipse.debug.ui.launchActionSet + persp.actionSet:org.eclipse.jdt.ui.JavaActionSet + persp.actionSet:org.eclipse.jdt.ui.JavaElementCreationActionSet + persp.actionSet:org.eclipse.ui.NavigateActionSet + persp.viewSC:org.eclipse.jdt.ui.PackageExplorer + persp.viewSC:org.eclipse.jdt.ui.TypeHierarchy + persp.viewSC:org.eclipse.jdt.ui.SourceView + persp.viewSC:org.eclipse.jdt.ui.JavadocView + persp.viewSC:org.eclipse.search.ui.views.SearchView + persp.viewSC:org.eclipse.ui.console.ConsoleView + persp.viewSC:org.eclipse.ui.views.ContentOutline + persp.viewSC:org.eclipse.ui.views.ProblemView + persp.viewSC:org.eclipse.ui.views.ResourceNavigator + persp.viewSC:org.eclipse.ui.views.TaskList + persp.viewSC:org.eclipse.ui.views.ProgressView + persp.viewSC:org.eclipse.ui.navigator.ProjectExplorer + persp.viewSC:org.eclipse.ui.texteditor.TemplatesView + persp.viewSC:org.eclipse.pde.runtime.LogView + persp.newWizSC:org.eclipse.jdt.ui.wizards.JavaProjectWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewPackageCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewClassCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewEnumCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard + persp.newWizSC:org.eclipse.ui.wizards.new.folder + persp.newWizSC:org.eclipse.ui.wizards.new.file + persp.newWizSC:org.eclipse.ui.editors.wizards.UntitledTextFileWizard + persp.perspSC:org.eclipse.jdt.ui.JavaBrowsingPerspective + persp.perspSC:org.eclipse.debug.ui.DebugPerspective + persp.viewSC:org.eclipse.mylyn.tasks.ui.views.tasks + persp.newWizSC:org.eclipse.mylyn.tasks.ui.wizards.new.repository.task + persp.showIn:org.eclipse.jdt.ui.PackageExplorer + persp.showIn:org.eclipse.team.ui.GenericHistoryView + persp.showIn:org.eclipse.ui.views.ResourceNavigator + persp.showIn:org.eclipse.ui.navigator.ProjectExplorer + persp.actionSet:org.eclipse.debug.ui.breakpointActionSet + persp.actionSet:org.eclipse.jdt.debug.ui.JDTDebugActionSet + persp.actionSet:org.eclipse.eclemma.ui.CoverageActionSet + persp.showIn:org.eclipse.eclemma.ui.CoverageView + persp.showIn:org.eclipse.egit.ui.RepositoriesView + persp.newWizSC:org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizard + persp.actionSet:org.eclipse.jdt.junit.JUnitActionSet + persp.newWizSC:org.eclipse.xtend.ide.wizards.NewXtendClassWizard + persp.newWizSC:org.eclipse.xtend.ide.wizards.NewXtendInterfaceWizard + persp.newWizSC:org.eclipse.xtend.ide.wizards.NewXtendEnumWizard + persp.newWizSC:org.eclipse.xtend.ide.wizards.NewXtendAnnotationWizard + persp.viewSC:org.eclipse.ant.ui.views.AntView + + + + org.eclipse.e4.primaryNavigationStack + + View + categoryTag:Java + + + View + categoryTag:Java + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:Java + + + + + View + categoryTag:Git + + + + + + + + + + View + categoryTag:Mylyn + + + + org.eclipse.e4.secondaryNavigationStack + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:Ant + + + + + + org.eclipse.e4.secondaryDataStack + + View + categoryTag:General + + + View + categoryTag:Java + + + View + categoryTag:Java + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:General + + + + + + + + active + Maximized + + View + categoryTag:Help + + + View + categoryTag:General + + + View + categoryTag:Help + + + + + + + View + categoryTag:Help + + + + + + View + categoryTag:General + active + activeOnClose + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Help + + + + org.eclipse.e4.primaryDataStack + EditorStack + + + + + + + View + categoryTag:Java + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + + View + categoryTag:General + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + + View + categoryTag:General + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:General + + + + + + View + categoryTag:Mylyn + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Git + + + + + View + categoryTag:Java + + + + + View + categoryTag:Ant + + + + toolbarSeparator + + + + Draggable + + + + toolbarSeparator + + + + Draggable + + + toolbarSeparator + + + + Draggable + + + Draggable + + + Draggable + + + toolbarSeparator + + + + Draggable + + + + toolbarSeparator + + + + toolbarSeparator + + + + Draggable + + + stretch + SHOW_RESTORE_MENU + + + Draggable + HIDEABLE + SHOW_RESTORE_MENU + + + + + stretch + + + Draggable + + + Draggable + + + + + + TrimStack + Draggable + + + + + + + + + + + + + platform:cocoa + + + + + + + + + platform:cocoa + + + + + + + + + + + + + + + platform:cocoa + + + + + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + + + + + + + + + + + platform:cocoa + + + platform:cocoa + + + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + + + + + + platform:cocoa + + + platform:cocoa + + + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + + + + + + + + platform:cocoa + + + + + platform:cocoa + + + + + + + + + + + + + + + + + + + + + platform:cocoa + + + + + + platform:cocoa + + + platform:cocoa + + + + + + + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + + + + + + platform:cocoa + + + + + + + + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + platform:cocoa + + + + platform:cocoa + + + + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + + + + + platform:cocoa + + + + + + + + + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + + + + platform:cocoa + + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + + + + + + + platform:cocoa + + + + + + + + + + + platform:cocoa + + + + + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + + + platform:cocoa + + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + platform:cocoa + + + + platform:cocoa + + + + + + + + + + + + + platform:cocoa + + + + + + + + + platform:cocoa + + + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + + platform:cocoa + + + + + + + + + platform:cocoa + + + platform:cocoa + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + + + + + + + + + + platform:cocoa + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Editor + + + + + View + categoryTag:Ant + + + + + View + categoryTag:Gradle + + + + + View + categoryTag:Gradle + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Java + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + NoRestore + + + + + View + categoryTag:Git + + + + + View + categoryTag:JavaFX + + + + + View + categoryTag:General + + + + + View + categoryTag:Help + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Maven + + + + + View + categoryTag:Maven + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Oomph + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:Code Recommenders + + + + + View + categoryTag:Code Recommenders + + + + + View + categoryTag:Code Recommenders + + + + + View + categoryTag:Code Recommenders + + + + + View + categoryTag:Code Recommenders + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:Team + + + + + View + categoryTag:Team + + + View + categoryTag:Help + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:Help + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:XML + + + + + View + categoryTag:XML + + + + + View + categoryTag:Xtend + + + + + View + categoryTag:Xtext + + + + + View + categoryTag:Xtext + + + + + + + + + + glue + move_after:PerspectiveSpacer + SHOW_RESTORE_MENU + + + move_after:Spacer Glue + HIDEABLE + SHOW_RESTORE_MENU + + + glue + move_after:SearchField + SHOW_RESTORE_MENU + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/segments_1 b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/segments_1 new file mode 100644 index 00000000..7dc090af Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/segments_1 differ diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/write.lock b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/write.lock new file mode 100644 index 00000000..e69de29b diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfe b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfe new file mode 100644 index 00000000..7a5bd68d Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfe differ diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfs b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfs new file mode 100644 index 00000000..2f9cdeea Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfs differ diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.si b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.si new file mode 100644 index 00000000..4e4357e9 Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.si differ diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/segments_1 b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/segments_1 new file mode 100644 index 00000000..0c71674c Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/segments_1 differ diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/write.lock b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/write.lock new file mode 100644 index 00000000..e69de29b diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/server-config.json b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/server-config.json new file mode 100644 index 00000000..1a56bac4 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/server-config.json @@ -0,0 +1,72 @@ +{ + "version": "v1", + "title": "Eclipse", + "timestamp": 1537746514989, + "ttl": 10080, + "helpUrl": "https://dev.eclipse.org/recommenders/community/aeri/v2/help/", + "feedbackUrl": "https://www.codetrails.com/error-analytics/", + "aboutUrl": "https://wiki.eclipse.org/EPP/Logging", + "submitUrl": "https://dev.eclipse.org/recommenders/community/confess/0.6/reports/", + "maxReportSize": 262144, + "problemsUrl": "https://www.eclipse.org/downloads/download.php?r\u003d1\u0026file\u003d/technology/epp/logging/problems.zip", + "problemsTtl": 20160, + "interestUrl": "https://dev.eclipse.org/recommenders/community/confess/v2/interest", + "connectTimeout": 10, + "socketTimeout": 10, + "acceptedProducts": [ + "org.eclipse.*", + "org.fordiac.*" + ], + "acceptedPlugins": [ + "org.apache.log4j.*", + "org.eclipse.*", + "org.fordiac.*" + ], + "acceptedPackages": [ + "ch.qos.*", + "com.cforcoding.*", + "com.google.*", + "com.gradleware.tooling.*", + "com.mountainminds.eclemma.*", + "com.naef.*", + "com.sun.*", + "java.*", + "javafx.*", + "javax.*", + "org.apache.*", + "org.eclipse.*", + "org.fordiac.*", + "org.gradle.*", + "org.jacoco.*", + "org.osgi.*", + "org.slf4j.*", + "sun.*" + ], + "requiredPackages": [ + "com.cforcoding.*", + "com.gradleware.tooling.*", + "com.mountainminds.eclemma.*", + "com.naef.*", + "org.eclipse.*", + "org.fordiac.*", + "org.gradle.*", + "org.jacoco.*" + ], + "acceptOtherPackages": false, + "acceptUiFreezes": true, + "ignoredStatuses": [ + ":java.io.IOException:There is not enough space on the disk", + ":java.net.*:", + "org.eclipse.core.filesystem::Could not delete*", + "org.eclipse.core.filesystem::Could not move*", + "org.eclipse.core.resources:org.eclipse.core.internal.resources.ResourceException:Resource is out of sync with the file system*", + "org.eclipse.core.runtime::Invalid input url*", + "org.eclipse.epp.mpc.ui:java.io.IOException:", + "org.eclipse.equinox.p2.*::", + "org.eclipse.jface:java.io.IOException:Unable to resolve plug-in*", + "org.eclipse.oomph.setup.core:$org.apache.http.ConnectionClosedException:", + "org.eclipse.pde.core::The current target platform contains errors*", + "org.eclipse.ui::Conflicting handlers for*" + ], + "problemsZipLastDownloadTimestamp": 0 +} \ No newline at end of file diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache new file mode 100644 index 00000000..593f4708 Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache differ diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache new file mode 100644 index 00000000..593f4708 Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache differ diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/index.db b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/index.db new file mode 100644 index 00000000..e69de29b diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache new file mode 100644 index 00000000..593f4708 Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache differ diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat new file mode 100644 index 00000000..3de398e8 Binary files /dev/null and b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat differ diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml new file mode 100644 index 00000000..a4ee3cbc --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml new file mode 100644 index 00000000..9e390f50 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml new file mode 100644 index 00000000..87a189c9 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml @@ -0,0 +1,10 @@ + +
+
+ + + + + +
+
diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log new file mode 100644 index 00000000..d5020326 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log @@ -0,0 +1 @@ +2018-09-23 19:48:34,110 [Worker-1: Loading available Gradle versions] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.9.0.20180606-2036.xml b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.9.0.20180606-2036.xml new file mode 100644 index 00000000..e33758c3 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.9.0.20180606-2036.xml @@ -0,0 +1,43 @@ + + + + %date [%thread] %-5level %logger{35} - %msg%n + + + OFF + + + + + ${org.eclipse.m2e.log.dir}/0.log + + ${org.eclipse.m2e.log.dir}/%i.log + 1 + 10 + + + 100MB + + + %date [%thread] %-5level %logger{35} - %msg%n + + + + + + WARN + + + + + + + + + + + + + + + diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup new file mode 100644 index 00000000..1f73e14c --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup @@ -0,0 +1,6 @@ + + diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties new file mode 100644 index 00000000..0340d569 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties @@ -0,0 +1,2 @@ +#Cached timestamps +#Sun Sep 23 19:48:41 EDT 2018 diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml new file mode 100644 index 00000000..5ca0b776 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml @@ -0,0 +1,3 @@ + +
+
diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.ui.intro/introstate b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.ui.intro/introstate new file mode 100644 index 00000000..236d56cb --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.ui.intro/introstate @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml new file mode 100644 index 00000000..851c296e --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml @@ -0,0 +1,15 @@ + +
+
+ + + + + + + + + + +
+
diff --git a/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml new file mode 100644 index 00000000..2f6bcc72 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/edu/nd/se2018/.metadata/version.ini b/src/edu/nd/se2018/.metadata/version.ini new file mode 100644 index 00000000..b9e86e42 --- /dev/null +++ b/src/edu/nd/se2018/.metadata/version.ini @@ -0,0 +1,3 @@ +#Sun Sep 23 19:48:26 EDT 2018 +org.eclipse.core.runtime=2 +org.eclipse.platform=4.8.0.v20180611-0500 diff --git a/src/edu/nd/se2018/examples/tests/week1/.gitignore b/src/edu/nd/se2018/examples/tests/week1/.gitignore new file mode 100644 index 00000000..a05892fb --- /dev/null +++ b/src/edu/nd/se2018/examples/tests/week1/.gitignore @@ -0,0 +1 @@ +/SummationTest.class diff --git a/src/edu/nd/se2018/examples/week1/.gitignore b/src/edu/nd/se2018/examples/week1/.gitignore new file mode 100644 index 00000000..32c8b9b2 --- /dev/null +++ b/src/edu/nd/se2018/examples/week1/.gitignore @@ -0,0 +1,2 @@ +/SumNumbers.class +/SumNumbersTest.class diff --git a/src/edu/nd/se2018/homework/.DS_Store b/src/edu/nd/se2018/homework/.DS_Store new file mode 100644 index 00000000..ea7ee7a8 Binary files /dev/null and b/src/edu/nd/se2018/homework/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/.classpath b/src/edu/nd/se2018/homework/.classpath new file mode 100644 index 00000000..1685f41e --- /dev/null +++ b/src/edu/nd/se2018/homework/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/edu/nd/se2018/homework/.metadata/.lock b/src/edu/nd/se2018/homework/.metadata/.lock new file mode 100644 index 00000000..e69de29b diff --git a/src/edu/nd/se2018/homework/.metadata/.log b/src/edu/nd/se2018/homework/.metadata/.log new file mode 100644 index 00000000..2b16eadb --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.log @@ -0,0 +1,99 @@ +!SESSION 2018-09-23 19:38:22.784 ----------------------------------------------- +eclipse.buildId=4.8.0.I20180611-0500 +java.version=1.8.0_181 +java.vendor=Oracle Corporation +BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US +Framework arguments: -product org.eclipse.epp.package.java.product -keyring /Users/connorgreen/.eclipse_keyring +Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.java.product -keyring /Users/connorgreen/.eclipse_keyring + +!ENTRY org.eclipse.core.net 1 0 2018-09-23 19:38:50.318 +!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences + +!ENTRY org.eclipse.egit.core 2 0 2018-09-23 19:38:50.396 +!MESSAGE Builtin LFS support not present/detected +!STACK 0 +java.lang.ClassNotFoundException: org.eclipse.jgit.lfs.BuiltinLFS cannot be found by org.eclipse.egit.core_5.0.0.201806131550-r + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:508) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at java.lang.Class.forName0(Native Method) + at java.lang.Class.forName(Class.java:264) + at org.eclipse.egit.core.Activator.registerBuiltinLFS(Activator.java:279) + at org.eclipse.egit.core.Activator.start(Activator.java:212) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:779) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) + at java.security.AccessController.doPrivileged(Native Method) + at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:772) + at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:729) + at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1002) + at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:354) + at org.eclipse.osgi.container.Module.doStart(Module.java:581) + at org.eclipse.osgi.container.Module.start(Module.java:449) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:114) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:505) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:392) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:454) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.egit.ui.Activator$RepositoryChangeScanner.(Activator.java:921) + at org.eclipse.egit.ui.Activator.setupRepoChangeScanner(Activator.java:1034) + at org.eclipse.egit.ui.Activator.start(Activator.java:336) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:779) + at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) + at java.security.AccessController.doPrivileged(Native Method) + at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:772) + at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:729) + at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1002) + at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:354) + at org.eclipse.osgi.container.Module.doStart(Module.java:581) + at org.eclipse.osgi.container.Module.start(Module.java:449) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:114) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:505) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:392) + at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:470) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150) + at java.lang.ClassLoader.loadClass(ClassLoader.java:357) + at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:609) + at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:177) + at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:931) + at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) + at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:60) + at org.eclipse.ui.internal.services.WorkbenchServiceRegistry.getSourceProviders(WorkbenchServiceRegistry.java:174) + at org.eclipse.ui.internal.services.SourceProviderService.readRegistry(SourceProviderService.java:104) + at org.eclipse.ui.internal.Workbench$34.runWithException(Workbench.java:2378) + at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32) + at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) + at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) + at org.eclipse.swt.widgets.Display.syncExec(Display.java:4860) + at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:95) + at org.eclipse.ui.internal.Workbench.initializeDefaultServices(Workbench.java:2373) + at org.eclipse.ui.internal.Workbench.init(Workbench.java:1654) + at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2859) + at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:654) + at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) + at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:597) + at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592) + at org.eclipse.equinox.launcher.Main.run(Main.java:1498) diff --git a/src/edu/nd/se2018/homework/.metadata/.mylyn/.taskListIndex/segments_1 b/src/edu/nd/se2018/homework/.metadata/.mylyn/.taskListIndex/segments_1 new file mode 100644 index 00000000..e8a7a449 Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.mylyn/.taskListIndex/segments_1 differ diff --git a/src/edu/nd/se2018/homework/.metadata/.mylyn/.taskListIndex/write.lock b/src/edu/nd/se2018/homework/.metadata/.mylyn/.taskListIndex/write.lock new file mode 100644 index 00000000..e69de29b diff --git a/src/edu/nd/se2018/homework/.metadata/.mylyn/repositories.xml.zip b/src/edu/nd/se2018/homework/.metadata/.mylyn/repositories.xml.zip new file mode 100644 index 00000000..00d5d2ad Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.mylyn/repositories.xml.zip differ diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version new file mode 100644 index 00000000..25cb955b --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index new file mode 100644 index 00000000..73feb1c5 Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version new file mode 100644 index 00000000..6b2aaa76 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree new file mode 100644 index 00000000..8a1fc9ec Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree differ diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources new file mode 100644 index 00000000..cd6189f8 Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..dffc6b51 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +version=1 diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..36bf22ae --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,7 @@ +content_assist_proposals_background=255,255,255 +content_assist_proposals_foreground=0,0,0 +eclipse.preferences.version=1 +org.eclipse.jdt.ui.formatterprofiles.version=14 +spelling_locale_initialized=true +useAnnotationsPrefPage=true +useQuickDiffPrefPage=true diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs new file mode 100644 index 00000000..67b1d96c --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.m2e.discovery.pref.projects= diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs new file mode 100644 index 00000000..43e97e40 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +mylyn.attention.migrated=true diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs new file mode 100644 index 00000000..8d462a6c --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs new file mode 100644 index 00000000..2b60c21d --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +migrated.task.repositories.secure.store=true +org.eclipse.mylyn.tasks.ui.filters.nonmatching=true +org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true +org.eclipse.mylyn.tasks.ui.welcome.message=true diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs new file mode 100644 index 00000000..61f3bb8b --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +overviewRuler_migration=migrated_3.1 diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs new file mode 100644 index 00000000..0f9f16c3 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -0,0 +1,5 @@ +PROBLEMS_FILTERS_MIGRATE=true +eclipse.preferences.version=1 +platformState=1536544865213 +quickStart=false +tipsAndTricks=false diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs new file mode 100644 index 00000000..aa3dc029 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs @@ -0,0 +1,3 @@ +//org.eclipse.ui.commands/state/org.eclipse.ui.navigator.resources.nested.changeProjectPresentation/org.eclipse.ui.commands.radioState=false +PLUGINS_NOT_ACTIVATED_ON_STARTUP=;org.eclipse.m2e.discovery; +eclipse.preferences.version=1 diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi new file mode 100644 index 00000000..3f0125b4 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi @@ -0,0 +1,2880 @@ + + + + activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration + ModelMigrationProcessor.001 + + + + + + + + topLevel + + + Minimized + MinimizedByZoom + + + persp.actionSet:org.eclipse.mylyn.doc.actionSet + persp.actionSet:org.eclipse.mylyn.tasks.ui.navigation + persp.actionSet:org.eclipse.ui.cheatsheets.actionSet + persp.actionSet:org.eclipse.search.searchActionSet + persp.actionSet:org.eclipse.ui.edit.text.actionSet.annotationNavigation + persp.actionSet:org.eclipse.ui.edit.text.actionSet.navigation + persp.actionSet:org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo + persp.actionSet:org.eclipse.ui.externaltools.ExternalToolsSet + persp.actionSet:org.eclipse.ui.actionSet.keyBindings + persp.actionSet:org.eclipse.ui.actionSet.openFiles + persp.actionSet:org.eclipse.debug.ui.launchActionSet + persp.actionSet:org.eclipse.jdt.ui.JavaActionSet + persp.actionSet:org.eclipse.jdt.ui.JavaElementCreationActionSet + persp.actionSet:org.eclipse.ui.NavigateActionSet + persp.viewSC:org.eclipse.jdt.ui.PackageExplorer + persp.viewSC:org.eclipse.jdt.ui.TypeHierarchy + persp.viewSC:org.eclipse.jdt.ui.SourceView + persp.viewSC:org.eclipse.jdt.ui.JavadocView + persp.viewSC:org.eclipse.search.ui.views.SearchView + persp.viewSC:org.eclipse.ui.console.ConsoleView + persp.viewSC:org.eclipse.ui.views.ContentOutline + persp.viewSC:org.eclipse.ui.views.ProblemView + persp.viewSC:org.eclipse.ui.views.ResourceNavigator + persp.viewSC:org.eclipse.ui.views.TaskList + persp.viewSC:org.eclipse.ui.views.ProgressView + persp.viewSC:org.eclipse.ui.navigator.ProjectExplorer + persp.viewSC:org.eclipse.ui.texteditor.TemplatesView + persp.viewSC:org.eclipse.pde.runtime.LogView + persp.newWizSC:org.eclipse.jdt.ui.wizards.JavaProjectWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewPackageCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewClassCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewEnumCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard + persp.newWizSC:org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard + persp.newWizSC:org.eclipse.ui.wizards.new.folder + persp.newWizSC:org.eclipse.ui.wizards.new.file + persp.newWizSC:org.eclipse.ui.editors.wizards.UntitledTextFileWizard + persp.perspSC:org.eclipse.jdt.ui.JavaBrowsingPerspective + persp.perspSC:org.eclipse.debug.ui.DebugPerspective + persp.viewSC:org.eclipse.mylyn.tasks.ui.views.tasks + persp.newWizSC:org.eclipse.mylyn.tasks.ui.wizards.new.repository.task + persp.showIn:org.eclipse.jdt.ui.PackageExplorer + persp.showIn:org.eclipse.team.ui.GenericHistoryView + persp.showIn:org.eclipse.ui.views.ResourceNavigator + persp.showIn:org.eclipse.ui.navigator.ProjectExplorer + persp.actionSet:org.eclipse.debug.ui.breakpointActionSet + persp.actionSet:org.eclipse.jdt.debug.ui.JDTDebugActionSet + persp.actionSet:org.eclipse.eclemma.ui.CoverageActionSet + persp.showIn:org.eclipse.eclemma.ui.CoverageView + persp.showIn:org.eclipse.egit.ui.RepositoriesView + persp.newWizSC:org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizard + persp.actionSet:org.eclipse.jdt.junit.JUnitActionSet + persp.newWizSC:org.eclipse.xtend.ide.wizards.NewXtendClassWizard + persp.newWizSC:org.eclipse.xtend.ide.wizards.NewXtendInterfaceWizard + persp.newWizSC:org.eclipse.xtend.ide.wizards.NewXtendEnumWizard + persp.newWizSC:org.eclipse.xtend.ide.wizards.NewXtendAnnotationWizard + persp.viewSC:org.eclipse.ant.ui.views.AntView + + + + org.eclipse.e4.primaryNavigationStack + + View + categoryTag:Java + + + View + categoryTag:Java + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:Java + + + + + View + categoryTag:Git + + + + + + + + + + View + categoryTag:Mylyn + + + + org.eclipse.e4.secondaryNavigationStack + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:Ant + + + + + + org.eclipse.e4.secondaryDataStack + + View + categoryTag:General + + + View + categoryTag:Java + + + View + categoryTag:Java + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:General + + + View + categoryTag:General + + + + + + + + active + Maximized + + View + categoryTag:Help + + + View + categoryTag:General + + + View + categoryTag:Help + + + + + + + View + categoryTag:Help + + + + + + View + categoryTag:General + active + activeOnClose + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Help + + + + org.eclipse.e4.primaryDataStack + EditorStack + + + + + + + View + categoryTag:Java + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + + View + categoryTag:General + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + + View + categoryTag:General + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:General + + + + + + View + categoryTag:Mylyn + + ViewMenu + menuContribution:menu + + + + + + + View + categoryTag:Git + + + + + View + categoryTag:Java + + + + + View + categoryTag:Ant + + + + toolbarSeparator + + + + Draggable + + + + toolbarSeparator + + + + Draggable + + + toolbarSeparator + + + + Draggable + + + Draggable + + + Draggable + + + toolbarSeparator + + + + Draggable + + + + toolbarSeparator + + + + toolbarSeparator + + + + Draggable + + + stretch + SHOW_RESTORE_MENU + + + Draggable + HIDEABLE + SHOW_RESTORE_MENU + + + + + stretch + + + Draggable + + + Draggable + + + + + + TrimStack + Draggable + + + + + + + + + + + + + platform:cocoa + + + + + + + + + platform:cocoa + + + + + + + + + + + + + + + platform:cocoa + + + + + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + + + + + + + + + + + platform:cocoa + + + platform:cocoa + + + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + + + + + + platform:cocoa + + + platform:cocoa + + + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + + + + + + + + platform:cocoa + + + + + platform:cocoa + + + + + + + + + + + + + + + + + + + + + platform:cocoa + + + + + + platform:cocoa + + + platform:cocoa + + + + + + + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + + + + + + platform:cocoa + + + + + + + + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + platform:cocoa + + + + platform:cocoa + + + + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + + + + + platform:cocoa + + + + + + + + + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + + + + platform:cocoa + + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + platform:cocoa + + + + + + + + + + platform:cocoa + + + + + + + + + + + platform:cocoa + + + + + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + + + platform:cocoa + + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + platform:cocoa + + + + platform:cocoa + + + + + + + + + + + + + platform:cocoa + + + + + + + + + platform:cocoa + + + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + + platform:cocoa + + + + + + + + + platform:cocoa + + + platform:cocoa + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + platform:cocoa + + + + + platform:cocoa + + + platform:cocoa + + + + + + platform:cocoa + + + platform:cocoa + + + platform:cocoa + + + + + + + + + + + + + + + + platform:cocoa + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Editor + + + + + View + categoryTag:Ant + + + + + View + categoryTag:Gradle + + + + + View + categoryTag:Gradle + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Java + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + + + + + View + categoryTag:Git + NoRestore + + + + + View + categoryTag:Git + + + + + View + categoryTag:JavaFX + + + + + View + categoryTag:General + + + + + View + categoryTag:Help + + + + + View + categoryTag:Debug + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java Browsing + + + + + View + categoryTag:Java + + + + + View + categoryTag:General + + + + + View + categoryTag:Java + + + + + View + categoryTag:Java + + + + + View + categoryTag:Maven + + + + + View + categoryTag:Maven + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Mylyn + + + + + View + categoryTag:Oomph + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:Plug-in Development + + + + + View + categoryTag:Code Recommenders + + + + + View + categoryTag:Code Recommenders + + + + + View + categoryTag:Code Recommenders + + + + + View + categoryTag:Code Recommenders + + + + + View + categoryTag:Code Recommenders + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:Team + + + + + View + categoryTag:Team + + + View + categoryTag:Help + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:Help + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:General + + + + + View + categoryTag:XML + + + + + View + categoryTag:XML + + + + + View + categoryTag:Xtend + + + + + View + categoryTag:Xtext + + + + + View + categoryTag:Xtext + + + + + + + + + + glue + move_after:PerspectiveSpacer + SHOW_RESTORE_MENU + + + move_after:Spacer Glue + HIDEABLE + SHOW_RESTORE_MENU + + + glue + move_after:SearchField + SHOW_RESTORE_MENU + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/segments_1 b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/segments_1 new file mode 100644 index 00000000..9692eb1f Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/segments_1 differ diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/write.lock b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/http-cache.lucene60/write.lock new file mode 100644 index 00000000..e69de29b diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfe b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfe new file mode 100644 index 00000000..bcb5b2f2 Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfe differ diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfs b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfs new file mode 100644 index 00000000..416c4343 Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.cfs differ diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.si b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.si new file mode 100644 index 00000000..fd4d4935 Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/_0.si differ diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/segments_1 b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/segments_1 new file mode 100644 index 00000000..1b53d7c6 Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/segments_1 differ diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/write.lock b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/local-history.lucene60/write.lock new file mode 100644 index 00000000..e69de29b diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/server-config.json b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/server-config.json new file mode 100644 index 00000000..2603f28b --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/server-config.json @@ -0,0 +1,72 @@ +{ + "version": "v1", + "title": "Eclipse", + "timestamp": 1537745936938, + "ttl": 10080, + "helpUrl": "https://dev.eclipse.org/recommenders/community/aeri/v2/help/", + "feedbackUrl": "https://www.codetrails.com/error-analytics/", + "aboutUrl": "https://wiki.eclipse.org/EPP/Logging", + "submitUrl": "https://dev.eclipse.org/recommenders/community/confess/0.6/reports/", + "maxReportSize": 262144, + "problemsUrl": "https://www.eclipse.org/downloads/download.php?r\u003d1\u0026file\u003d/technology/epp/logging/problems.zip", + "problemsTtl": 20160, + "interestUrl": "https://dev.eclipse.org/recommenders/community/confess/v2/interest", + "connectTimeout": 10, + "socketTimeout": 10, + "acceptedProducts": [ + "org.eclipse.*", + "org.fordiac.*" + ], + "acceptedPlugins": [ + "org.apache.log4j.*", + "org.eclipse.*", + "org.fordiac.*" + ], + "acceptedPackages": [ + "ch.qos.*", + "com.cforcoding.*", + "com.google.*", + "com.gradleware.tooling.*", + "com.mountainminds.eclemma.*", + "com.naef.*", + "com.sun.*", + "java.*", + "javafx.*", + "javax.*", + "org.apache.*", + "org.eclipse.*", + "org.fordiac.*", + "org.gradle.*", + "org.jacoco.*", + "org.osgi.*", + "org.slf4j.*", + "sun.*" + ], + "requiredPackages": [ + "com.cforcoding.*", + "com.gradleware.tooling.*", + "com.mountainminds.eclemma.*", + "com.naef.*", + "org.eclipse.*", + "org.fordiac.*", + "org.gradle.*", + "org.jacoco.*" + ], + "acceptOtherPackages": false, + "acceptUiFreezes": true, + "ignoredStatuses": [ + ":java.io.IOException:There is not enough space on the disk", + ":java.net.*:", + "org.eclipse.core.filesystem::Could not delete*", + "org.eclipse.core.filesystem::Could not move*", + "org.eclipse.core.resources:org.eclipse.core.internal.resources.ResourceException:Resource is out of sync with the file system*", + "org.eclipse.core.runtime::Invalid input url*", + "org.eclipse.epp.mpc.ui:java.io.IOException:", + "org.eclipse.equinox.p2.*::", + "org.eclipse.jface:java.io.IOException:Unable to resolve plug-in*", + "org.eclipse.oomph.setup.core:$org.apache.http.ConnectionClosedException:", + "org.eclipse.pde.core::The current target platform contains errors*", + "org.eclipse.ui::Conflicting handlers for*" + ], + "problemsZipLastDownloadTimestamp": 0 +} \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache new file mode 100644 index 00000000..593f4708 Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache differ diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache new file mode 100644 index 00000000..593f4708 Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache differ diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/index.db b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/index.db new file mode 100644 index 00000000..e69de29b diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache new file mode 100644 index 00000000..593f4708 Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache differ diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat new file mode 100644 index 00000000..3de398e8 Binary files /dev/null and b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat differ diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml new file mode 100644 index 00000000..a4ee3cbc --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml new file mode 100644 index 00000000..9e390f50 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml @@ -0,0 +1,2 @@ + + diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml new file mode 100644 index 00000000..5fb42bb4 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml @@ -0,0 +1,10 @@ + +
+
+ + + + + +
+
diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log new file mode 100644 index 00000000..b3e3e900 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.m2e.logback.configuration/0.log @@ -0,0 +1 @@ +2018-09-23 19:38:56,044 [Worker-18: Loading available Gradle versions] INFO c.g.t.t.d.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.9.0.20180606-2036.xml b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.9.0.20180606-2036.xml new file mode 100644 index 00000000..e33758c3 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.9.0.20180606-2036.xml @@ -0,0 +1,43 @@ + + + + %date [%thread] %-5level %logger{35} - %msg%n + + + OFF + + + + + ${org.eclipse.m2e.log.dir}/0.log + + ${org.eclipse.m2e.log.dir}/%i.log + 1 + 10 + + + 100MB + + + %date [%thread] %-5level %logger{35} - %msg%n + + + + + + WARN + + + + + + + + + + + + + + + diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup new file mode 100644 index 00000000..1f73e14c --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup @@ -0,0 +1,6 @@ + + diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties new file mode 100644 index 00000000..20b30910 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.pde.core/.cache/clean-cache.properties @@ -0,0 +1,2 @@ +#Cached timestamps +#Sun Sep 23 19:39:01 EDT 2018 diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml new file mode 100644 index 00000000..5ca0b776 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml @@ -0,0 +1,3 @@ + +
+
diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.ui.intro/introstate b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.ui.intro/introstate new file mode 100644 index 00000000..236d56cb --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.ui.intro/introstate @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml new file mode 100644 index 00000000..851c296e --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml @@ -0,0 +1,15 @@ + +
+
+ + + + + + + + + + +
+
diff --git a/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml new file mode 100644 index 00000000..2e9ce2a3 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/.metadata/version.ini b/src/edu/nd/se2018/homework/.metadata/version.ini new file mode 100644 index 00000000..96fdc0f3 --- /dev/null +++ b/src/edu/nd/se2018/homework/.metadata/version.ini @@ -0,0 +1,3 @@ +#Sun Sep 23 19:38:48 EDT 2018 +org.eclipse.core.runtime=2 +org.eclipse.platform=4.8.0.v20180611-0500 diff --git a/src/edu/nd/se2018/homework/.project b/src/edu/nd/se2018/homework/.project new file mode 100644 index 00000000..0e9395c4 --- /dev/null +++ b/src/edu/nd/se2018/homework/.project @@ -0,0 +1,23 @@ + + + homework5 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + + diff --git a/src/edu/nd/se2018/homework/build.fxbuild b/src/edu/nd/se2018/homework/build.fxbuild new file mode 100644 index 00000000..c60e1a2c --- /dev/null +++ b/src/edu/nd/se2018/homework/build.fxbuild @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/edu/nd/se2018/homework/hw6/.classpath b/src/edu/nd/se2018/homework/hw6/.classpath new file mode 100644 index 00000000..0f119a6f --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/edu/nd/se2018/homework/hw6/.gitignore b/src/edu/nd/se2018/homework/hw6/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/src/edu/nd/se2018/homework/hw6/.project b/src/edu/nd/se2018/homework/hw6/.project new file mode 100644 index 00000000..7032808a --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/.project @@ -0,0 +1,23 @@ + + + hw6 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + + diff --git a/src/edu/nd/se2018/homework/hw6/.settings/org.eclipse.jdt.core.prefs b/src/edu/nd/se2018/homework/hw6/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..3a215370 --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/src/edu/nd/se2018/homework/hw6/app/.classpath b/src/edu/nd/se2018/homework/hw6/app/.classpath new file mode 100644 index 00000000..00278094 --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/edu/nd/se2018/homework/hw6/app/.project b/src/edu/nd/se2018/homework/hw6/app/.project new file mode 100644 index 00000000..aaec6ee4 --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/.project @@ -0,0 +1,17 @@ + + + app + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/src/edu/nd/se2018/homework/hw6/app/hw6/.gitignore b/src/edu/nd/se2018/homework/hw6/app/hw6/.gitignore new file mode 100644 index 00000000..2535a215 --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/hw6/.gitignore @@ -0,0 +1,5 @@ +/Main.class +/MapBuilder.class +/alien.class +/chip.class +/chip$1.class diff --git a/src/edu/nd/se2018/homework/hw6/app/hw6/Main.java b/src/edu/nd/se2018/homework/hw6/app/hw6/Main.java new file mode 100644 index 00000000..bb7ecee4 --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/hw6/Main.java @@ -0,0 +1,46 @@ +package hw6; + +import javafx.application.Application; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import javafx.stage.Stage; +import javafx.scene.Node; +import javafx.scene.Scene; +import javafx.scene.layout.AnchorPane; + +import hw6.MapBuilder; + +public class Main extends Application { + ObservableList root = FXCollections.observableArrayList(); + MapBuilder map = new MapBuilder(); + int[][] gameGrid = new int[25][25]; + int scale = 25; + public int level = 1; + + @Override + public void start(Stage primaryStage) { + try { + AnchorPane base = new AnchorPane(); + Scene scene = new Scene(base,625,625); + gameGrid = map.buildLevel(level); + map.drawLevel(root,scale,base); + //System.out.println("level 2"); + + primaryStage.setScene(scene); + primaryStage.show(); + // build chip into the map + chip _chip1 = new chip(base); + alien _alien = new alien(base,gameGrid); + _chip1.addObserver(_alien); + //System.out.print(gameGrid[20][20]); + _chip1.playChips(base, gameGrid, scene,level,primaryStage); + + } catch(Exception e) { + e.printStackTrace(); + } + } + + public static void main(String[] args) { + launch(args); + } +} diff --git a/src/edu/nd/se2018/homework/hw6/app/hw6/MapBuilder.java b/src/edu/nd/se2018/homework/hw6/app/hw6/MapBuilder.java new file mode 100644 index 00000000..eeb35193 --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/hw6/MapBuilder.java @@ -0,0 +1,75 @@ +package hw6; + +import javafx.collections.ObservableList; +import javafx.scene.Node; + +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; +import javafx.scene.layout.AnchorPane; + +import hw6.blocks.*; + +public class MapBuilder { + int[][] gameGrid = new int[25][25]; + final int dimensions = 25; + ImageView block; + + public int[][] buildLevel( int level) { + if(level == 1) { + buildlevel1(); + System.out.println("level 1"); + } + else if(level == 2) { + buildlevel2(); + System.out.println("level 2"); + } + return gameGrid; + } + private void buildlevel1(){ + for(int i = 0; i < 25 ; i++) { + gameGrid[0][i] = gameGrid[i][24] = gameGrid[i][0] = gameGrid[24][i] = 1; // build in border walls + } + gameGrid[20][20] = 3; // place a door to the next level + } + private void buildlevel2(){ + for(int i = 0; i < 25 ; i++) { + gameGrid[0][i] = gameGrid[i][24] = gameGrid[i][0] = gameGrid[24][i] = 1; // build in border walls + } + gameGrid[23][10] = 2; // place a key + gameGrid[2][2] = 3; // place a door to the next level + gameGrid[4][2] = 4; // locked until you have the key + gameGrid[4][1] = gameGrid[4][3] = gameGrid[3][3] = gameGrid[2][3] = gameGrid[1][3] = 1; + } + public void drawLevel(ObservableList root, int scale, AnchorPane base) { + wall _wall = new wall(); + portal _portal = new portal(); + walkable _walkable = new walkable(); + key _key = new key(); + greenKeyBlock _keyBlock = new greenKeyBlock(); + for (int x = 0; x < dimensions; x++) { + for (int y = 0; y < dimensions;y++) { + ImageView block = block = new ImageView(_walkable.getImageView()); // says don't need but throws error if not included + if(gameGrid[x][y]==1) { + //System.out.println("This is a 1"); + // borders + block = new ImageView(_wall.getImageView()); + }else if(gameGrid[x][y] == 2){ + //System.out.println("This is a 2"); + // key + block = new ImageView(_key.getImageView()); + }else if(gameGrid[x][y] == 3){ + block = new ImageView(_portal.getImageView()); + //portal placement + }else if(gameGrid[x][y] == 4){ + block = new ImageView(_keyBlock.getImageView()); + }else { + //rect.setFill(Color.GREY); + gameGrid[x][y] = 0; + } + block.setX(scale*x); + block.setY(scale*y);; + base.getChildren().add(block); + } + } + } +} diff --git a/src/edu/nd/se2018/homework/hw6/app/hw6/alien.java b/src/edu/nd/se2018/homework/hw6/app/hw6/alien.java new file mode 100644 index 00000000..0902732a --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/hw6/alien.java @@ -0,0 +1,88 @@ +package hw6; + +import java.util.Observable; +import java.util.Observer; +import hw6.chip; + +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; +import javafx.scene.layout.AnchorPane; +import javafx.scene.text.Text; + + +public class alien implements Observer{ + + + int xLocal = 25; + int yLocal = 500; + int chipX; + int chipY; + int scale = 25; // if time find a way to keep this throughout structure + public Image _im; + public ImageView _alien; + int[][] levelMap; + + public alien(AnchorPane base,int[][] level) { + levelMap = level; + _im = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/src/images/drone4.png", 25, 25, true, true); + _alien = new ImageView(_im); + _alien.setX(xLocal); + _alien.setY(yLocal); + base.getChildren().add(_alien); + + } + public void hunt() { + if(xLocal/25 == chipX/25 && yLocal/25 == chipX/25) { + Text text = new Text(); + text.setText("The Alien Has Caught you, sorry you lose"); + System.out.println("The Alien Has Caught you, sorry you lose"); + text.setX(300); + text.setY(300); + }else { // the alien has too easy of a time catching chip if I don't lower the size + if (xLocal - chipX < 0) { + if(resCheck(xLocal+5,yLocal)) { + xLocal = xLocal+5; + } + } + else { + if(resCheck(xLocal-5,yLocal)) { + xLocal = xLocal-5; + + } + } + if (yLocal - chipY < 0) { + if(resCheck(xLocal,yLocal+5)) { + yLocal = yLocal+5; + } + } + else { + if(resCheck(xLocal,yLocal-5)) { + yLocal = yLocal-5; + } + } + } + System.out.print(xLocal/25); + System.out.print(yLocal/25); + _alien.setY(yLocal); + _alien.setX(xLocal); + } + public boolean resCheck(int x, int y) { // check if the alien is going to be pushed into restrictive space + if(levelMap[y/25][x/25] != 0){ + return false; + }else { + //System.out.println("Good Move"); + return true; + } + } + + @Override + public void update(Observable c, Object arg) { + if (c instanceof chip){ //update status of the observed class + chipX = ((chip)c).getX(); + chipY = ((chip)c).getY(); + hunt(); + } + + } + +} diff --git a/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/.gitignore b/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/.gitignore new file mode 100644 index 00000000..2a26e6c6 --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/.gitignore @@ -0,0 +1,5 @@ +/greenKeyBlock.class +/key.class +/portal.class +/walkable.class +/wall.class diff --git a/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/greenKeyBlock.java b/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/greenKeyBlock.java new file mode 100644 index 00000000..35f50875 --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/greenKeyBlock.java @@ -0,0 +1,21 @@ +package hw6.blocks; + +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; + +public class greenKeyBlock{ + + int scale = 24; + public Image pImage; + public ImageView pblock; + + public greenKeyBlock(){ // built constructor so that I can build out walls in map builder + + pImage = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/chip/textures/greenKeyWall.png", 25, 25, true, true); + pblock = new ImageView(pImage); + } + + public Image getImageView(){ + return pImage; + } +} \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/key.java b/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/key.java new file mode 100644 index 00000000..f709edbf --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/key.java @@ -0,0 +1,21 @@ +package hw6.blocks; + +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; + +public class key{ + + int scale = 24; + public Image pImage; + public ImageView pblock; + + public key(){ // built constructor so that I can build out walls in map builder + + pImage = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/chip/textures/greenKey.png", 25, 25, true, true); + pblock = new ImageView(pImage); + } + + public Image getImageView(){ + return pImage; + } +} \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/portal.java b/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/portal.java new file mode 100644 index 00000000..82c74b90 --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/portal.java @@ -0,0 +1,21 @@ +package hw6.blocks; + +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; + +public class portal{ + + int scale = 24; + public Image pImage; + public ImageView pblock; + + public portal(){ // built constructor so that I can build out walls in map builder + + pImage = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/chip/textures/portal.png", 25, 25, true, true); + pblock = new ImageView(pImage); + } + + public Image getImageView(){ + return pImage; + } +} diff --git a/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/walkable.java b/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/walkable.java new file mode 100644 index 00000000..16271813 --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/walkable.java @@ -0,0 +1,21 @@ +package hw6.blocks; + +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; + +public class walkable{ + + int scale = 24; + public Image pImage; + public ImageView pblock; + + public walkable(){ // built constructor so that I can build out walls in map builder + + pImage = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/chip/textures/BlankTile.png", 25, 25, true, true); + pblock = new ImageView(pImage); + } + + public Image getImageView(){ + return pImage; + } +} diff --git a/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/wall.java b/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/wall.java new file mode 100644 index 00000000..468e1d2b --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/hw6/blocks/wall.java @@ -0,0 +1,21 @@ +package hw6.blocks; + +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; + +public class wall{ + + int scale = 24; + public Image pImage; + public ImageView pblock; + + public wall(){ // built constructor so that I can build out walls in map builder + + pImage = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/chip/textures/black.jpeg", 25, 25, true, true); + pblock = new ImageView(pImage); + } + + public Image getImageView(){ + return pImage; + } +} diff --git a/src/edu/nd/se2018/homework/hw6/app/hw6/chip.java b/src/edu/nd/se2018/homework/hw6/app/hw6/chip.java new file mode 100644 index 00000000..5a48946f --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/hw6/chip.java @@ -0,0 +1,184 @@ +package hw6; + +import java.util.Observable; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; +import javafx.scene.layout.AnchorPane; +import javafx.scene.paint.Color; +import javafx.scene.text.Font; +import javafx.scene.text.Text; +import javafx.stage.Stage; +import javafx.scene.input.*; +import javafx.event.EventHandler; +import javafx.scene.Scene; + +public class chip extends Observable{ + + int xLocal = 300; + int yLocal = 300; + int scale = 25; // if time find a way to keep this throughout structure + int keys = 0; + int nextLevel = 0; // if 1, then signal to main to load the next level of play + public Image _im; + public ImageView _chip; + int newLevel; + + public chip(AnchorPane base) { + _im = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/chip/textures/chipDown.png", 25, 25, true, true); + _chip = new ImageView(_im); + _chip.setX(xLocal); + _chip.setY(yLocal); + base.getChildren().add(_chip); + } + + public int getX() { + return xLocal; + } + public int getY() { + return yLocal; + } + public int getKey() { + return keys; + } + public void playChips(AnchorPane base, int [][] grid, Scene scene,int level, Stage stage) { + int previosLevel = level; + int flag = 0; + Image chipRight = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/chip/textures/chipRight.png",25, 25, true, true); + Image chipLeft = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/chip/textures/chipLeft.png",25, 25, true, true); + Image chipUp = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/chip/textures/chipUp.png",25, 25, true, true); + Image chipDown = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/chip/textures/chipDown.png",25, 25, true, true); + scene.setOnKeyPressed(new EventHandler() { + @Override public void handle(KeyEvent keyStroke) { + switch (keyStroke.getCode()) { + case UP: + _chip.setImage(chipUp); + newLevel = goUp(grid,level,_chip); + setChanged(); // update the alien class + notifyObservers(); + if(newLevel != previosLevel) { + levelChange(stage,base,newLevel); + } + break; + case RIGHT: + _chip.setImage(chipRight); + newLevel= goRight(grid,level,_chip); + setChanged(); // update class + notifyObservers(); + if(newLevel != previosLevel) { + levelChange(stage,base,newLevel); + } + break; + case DOWN: + _chip.setImage(chipDown); + newLevel= goDown(grid,level,_chip); + setChanged(); // update class + notifyObservers(); + if(newLevel != previosLevel) { + levelChange(stage,base,newLevel); + } + break; + case LEFT: + _chip.setImage(chipLeft); + newLevel = goLeft(grid,level,_chip); + setChanged(); // update class + notifyObservers(); + if(newLevel != previosLevel) { + levelChange(stage,base,newLevel); + } + break; + case ESCAPE: + + stage.close(); + default: + + break; + } + } + }); + + } + + public void levelChange(Stage stage, AnchorPane base,int level) { + Text text = new Text(); + text.setText("You have reached the portal congrats!"); + System.out.println("You have reached the portal congrats!"); + text.setX(100); + text.setY(300); + text.setFont(Font.font ("Verdana", 20)); + text.setFill(Color.RED); + base.getChildren().add(text); + if(level == 2) { + // here we will want to switch to the second level of the game + + } + if(level == 3) { + System.out.print("you won!"); + stage.close(); + + } + + + } + + public int goUp(int [][] grid, int level,ImageView chip) { + if(!checkMove(grid,xLocal/25,(yLocal-25)/scale)) { + // we have a odd block, so lets check if it is a key or portal + level = checkWall(grid,xLocal/25,(yLocal-25)/scale, level); + }else { + yLocal = yLocal - 25; + chip.setY(yLocal); + } + return level; + } + public int goDown(int [][] grid, int level,ImageView chip) { + if(!checkMove(grid,xLocal/25,(yLocal+25)/scale)){ + level = checkWall(grid,xLocal/25,(yLocal+25)/scale, level); + }else { + yLocal = yLocal + 25; + chip.setY(yLocal); + } + return level; + } + public int goLeft(int [][] grid, int level, ImageView chip) { + if(!checkMove(grid,(xLocal-25)/scale,yLocal/scale)) { + level = checkWall(grid,(xLocal-25)/scale,yLocal/scale, level); + }else { + xLocal = xLocal - 25; + chip.setX(xLocal); + } + return level; + } + public int goRight(int [][] grid, int level, ImageView chip) { + if(!checkMove(grid,(xLocal+25)/scale,yLocal/scale)) { + level = checkWall(grid,(xLocal+25)/scale,yLocal/scale, level); + }else { + xLocal = xLocal + 25; + chip.setX(xLocal); + } + return level; + } + public boolean checkMove(int [][] grid, int x, int y) { + System.out.println(grid[x][y]); + System.out.println(x); + System.out.println(y); + + if(grid[x][y] == 0) { + return true; + }else { + return false; + } + } + public int checkWall(int[][] grid, int x, int y,int level) { + if(grid[x][y] == 2) { + keys = keys + 1; + grid[x][y] = 0; + } else if(grid[x][y] == 3) { + level = level+1; + System.out.println("Winner"); + }else if((grid[x][y] == 4) && keys >= 1) { + grid[x][y] = 0; + } + return level; + } + +} diff --git a/src/edu/nd/se2018/homework/hw6/app/hw6/reflection b/src/edu/nd/se2018/homework/hw6/app/hw6/reflection new file mode 100644 index 00000000..33be80fe --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/app/hw6/reflection @@ -0,0 +1,52 @@ +Over the course of the project I was able to realize how valuable a well thought +out design can be when building a larger system. When I started my design +I did not anticipate the challenges that present themselves when you have to +make edits that originate very low in the structure but manifest on a high level +(aka the game board). I found that a I wanted to do as much creating of the +chip and the block structures as low to their class as possible. This +unfortunately meant that a lot of the functions had several arguments that +were passed in layer over layer. This is an area where I would like to focus +time in improvement and hopefully find a better solution more akin to passing +by reference in C++. + +Major Design changes had to be that originally the alien was moving too fast +and this didn't really make the game very fun, so now it moves slower but is not +limited to moving square to square. Also I was happy to see that I could +compartmentalize most of the moving behavior of chip into condensed functions +instead of having large about of code in each of the case statements there were +handled else where. Also the use of a factory model when designing the blocks +to be pushed into the screen was also very helpful and it was interesting to +see in action that if a block ever needed to be added, placed differently, or +changed it could be done so very easily. + +If I could start from scratch I thing it would have been interesting to have the +map move around chip, and would have allowed for more dynamic reallocation of the +map as he went along. Also given my design shortcomings (transition from level +1 to level 2 and deleting squares) less on the design of maps and end screens +individual and gone from a state machine approach then built out the states. + +Pattern name: Observer +Class Name Role in pattern +Observer: Alien +Observable: Chip +Purpose: Chip as he is going to grab keys or make it to the portal must avoid +the alien and his drone as a challenge to the game + +Pattern name: Factory +Class Name Role in pattern +Factory: MapBuilder +Building: Blocks folder +Purpose: My goal going into the designing the levels was that I could pass a +grid of information between the different classes so that they could easily +have information about what is around them. To then build the image from this +I used the factory model to assemble the image from a collection of block class +types. + +Pattern name: State +Class Name Role in pattern +Controller: moveChip Method +States: movements of chip +Purpose: I used the moveChip function to control the state of chip, then using +a case statement to encapsulate that behavior. It would have been possible to +use a separate interface class, however it seemed like unneeded overhead to the +functionality of chip. diff --git a/src/edu/nd/se2018/homework/hw6/build.fxbuild b/src/edu/nd/se2018/homework/hw6/build.fxbuild new file mode 100644 index 00000000..63347cbd --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/build.fxbuild @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/edu/nd/se2018/homework/hw6/finalDesign.JPG b/src/edu/nd/se2018/homework/hw6/finalDesign.JPG new file mode 100644 index 00000000..21019ea4 Binary files /dev/null and b/src/edu/nd/se2018/homework/hw6/finalDesign.JPG differ diff --git a/src/edu/nd/se2018/homework/hw6/firstCheck/IMG_0594.JPG b/src/edu/nd/se2018/homework/hw6/firstCheck/IMG_0594.JPG new file mode 100644 index 00000000..51ecd383 Binary files /dev/null and b/src/edu/nd/se2018/homework/hw6/firstCheck/IMG_0594.JPG differ diff --git a/src/edu/nd/se2018/homework/hw6/firstCheck/Screen Shot 2018-10-02 at 10.18.51 PM.png b/src/edu/nd/se2018/homework/hw6/firstCheck/Screen Shot 2018-10-02 at 10.18.51 PM.png new file mode 100644 index 00000000..7123b217 Binary files /dev/null and b/src/edu/nd/se2018/homework/hw6/firstCheck/Screen Shot 2018-10-02 at 10.18.51 PM.png differ diff --git a/src/edu/nd/se2018/homework/hw6/firstCheck/Screen Shot 2018-10-02 at 10.19.09 PM.png b/src/edu/nd/se2018/homework/hw6/firstCheck/Screen Shot 2018-10-02 at 10.19.09 PM.png new file mode 100644 index 00000000..f3d5d40d Binary files /dev/null and b/src/edu/nd/se2018/homework/hw6/firstCheck/Screen Shot 2018-10-02 at 10.19.09 PM.png differ diff --git a/src/edu/nd/se2018/homework/hw6/firstCheck/Status+Features b/src/edu/nd/se2018/homework/hw6/firstCheck/Status+Features new file mode 100644 index 00000000..7385c889 --- /dev/null +++ b/src/edu/nd/se2018/homework/hw6/firstCheck/Status+Features @@ -0,0 +1 @@ +After the UML, I have done initial map design and the set up of the observer class Chip. I wanted to get the layout functioning before moving forward with the images and have begun to design the two levels which will be a more time consuming process. I hope to have aliens that chase chip, as well as a concept of lock and key that will force chip to explore the map before advancing between the levels. diff --git a/src/edu/nd/se2018/homework/hwk1/.gitignore b/src/edu/nd/se2018/homework/hwk1/.gitignore new file mode 100644 index 00000000..9fed9070 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk1/.gitignore @@ -0,0 +1,6 @@ +/Question1.class +/Question1Test.class +/Question2.class +/Question2Test.class +/Question3.class +/Question3Test.class diff --git a/src/edu/nd/se2018/homework/hwk1/Question1.java b/src/edu/nd/se2018/homework/hwk1/Question1.java deleted file mode 100644 index d990b3b1..00000000 --- a/src/edu/nd/se2018/homework/hwk1/Question1.java +++ /dev/null @@ -1,10 +0,0 @@ -package edu.nd.se2018.homework.hwk1; - -public class Question1 { - - public Question1(){} - - public int getSumWithoutDuplicates(int[] numbers){ - return 0; - } -} diff --git a/src/edu/nd/se2018/homework/hwk1/Question2.java b/src/edu/nd/se2018/homework/hwk1/Question2.java deleted file mode 100644 index b04a7f86..00000000 --- a/src/edu/nd/se2018/homework/hwk1/Question2.java +++ /dev/null @@ -1,10 +0,0 @@ -package edu.nd.se2018.homework.hwk1; - -public class Question2 { - - public Question2(){} - - public String getMostFrequentWord(String input, String stopwords){ - return ""; - } -} diff --git a/src/edu/nd/se2018/homework/hwk1/Question3.java b/src/edu/nd/se2018/homework/hwk1/Question3.java deleted file mode 100644 index 740d282c..00000000 --- a/src/edu/nd/se2018/homework/hwk1/Question3.java +++ /dev/null @@ -1,9 +0,0 @@ -package edu.nd.se2018.homework.hwk1; -public class Question3 { - - public Question3(){} - - public int getMirrorCount(int[] numbers){ - return 0; - } -} diff --git a/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question1.java b/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question1.java new file mode 100644 index 00000000..d6f393f1 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question1.java @@ -0,0 +1,21 @@ +package src.edu.nd.se2018.homework.hwk1; +import java.util.*; + +public class Question1 { + + public Question1(){} + + public int getSumWithoutDuplicates(int[] numbers){ + HashSet holder = new HashSet(); + for (int a = 0; a < numbers.length; a++) { + holder.add(numbers[a]); + } + Iterator it = holder.iterator(); + int sum = 0; + while(it.hasNext()) { + sum = sum + it.next(); + } + //System.out.println(sum); + return sum; + } +} diff --git a/src/edu/nd/se2018/homework/hwk1/Question1Test.java b/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question1Test.java similarity index 88% rename from src/edu/nd/se2018/homework/hwk1/Question1Test.java rename to src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question1Test.java index 90204af1..8d1c9179 100644 --- a/src/edu/nd/se2018/homework/hwk1/Question1Test.java +++ b/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question1Test.java @@ -1,4 +1,4 @@ -package edu.nd.se2018.homework.hwk1; +package src.edu.nd.se2018.homework.hwk1; import org.junit.Test; public class Question1Test { diff --git a/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question2.java b/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question2.java new file mode 100644 index 00000000..ae5428ac --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question2.java @@ -0,0 +1,54 @@ +package src.edu.nd.se2018.homework.hwk1; +import java.util.*; + +public class Question2 { + + public Question2(){} + + public String getMostFrequentWord(String input, String stopwords){ + + HashMap freq = new HashMap (); + // break up the input stings into usable arrays + String[] words = input.split(" "); + String[] badwords = stopwords.split(" "); + List keys = new ArrayList(); // use the list to keep track of valid words that were inserted + for (int a = 0; a < words.length; a++) { + if(!Arrays.asList(badwords).contains(words[a])) { + //System.out.println(words[a]); + Integer f = freq.get(words[a]); + if (f == null) { + freq.put(words[a], 1); + } else { + freq.put(words[a], f+1); + } + keys.add(words[a]); // add to the key once we have a valid pass + } + } + int maxCount = 0; + String maxWord = null; + List maxWords = new ArrayList(); // keep track of what words have hit the max value + for (int b = 0; b < keys.size(); b++) { + int count = freq.get(keys.get(b)); // grab the freq from the map + //System.out.println(keys.get(b)); + //System.out.println(count); + if(count > maxCount) { // new max value + maxWord = keys.get(b); + maxCount = count; + } else if(count == maxCount) { + // this means we have tied for the max, and should check to see if more than 1 word shares the title + System.out.println(keys.get(b)); + maxWords.add(keys.get(b)); + } else { + //System.out.println("less"); + maxWords.clear(); // if it resets clear the max list so it can refresh + // we have a more frequent call no action + } + + } + if (maxWords.size() > 1) { // if there is more than 1 word at the max value for the list, then tie so return null + return null; + } else { + return maxWord; + } + } +} diff --git a/src/edu/nd/se2018/homework/hwk1/Question2Test.java b/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question2Test.java similarity index 95% rename from src/edu/nd/se2018/homework/hwk1/Question2Test.java rename to src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question2Test.java index 1921d1fb..f7bb46e2 100644 --- a/src/edu/nd/se2018/homework/hwk1/Question2Test.java +++ b/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question2Test.java @@ -1,4 +1,4 @@ -package edu.nd.se2018.homework.hwk1; +package src.edu.nd.se2018.homework.hwk1; import org.junit.Test; public class Question2Test { diff --git a/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question3.java b/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question3.java new file mode 100644 index 00000000..cd0e67b4 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question3.java @@ -0,0 +1,53 @@ +package src.edu.nd.se2018.homework.hwk1; +import java.util.*; +public class Question3 { + + public Question3(){} + + public int getMirrorCount(int[] numbers){ + Stack reverse = new Stack(); + int breakInLine = 0; // boolean to help know if there was an interuption in the sym + int seqLength = 0; // keep record + if(numbers.length ==0) { // if array doesn't have values then just push no sym + return 0; + } + int a; + for (a = 0; a < (numbers.length/2); a++) { // only need half for symmetry + reverse.push(numbers[a]); // push into stack for comparison to second half + //System.out.println(numbers[a]); + } + int b; + if(numbers.length%2 == 1) { // make sure the comparison to second half starts at the right point + // odd numbers + b = a + 1; + }else { + b = numbers.length/2; + } + while (!reverse.isEmpty()) { // run to the end of the first half + int comp = reverse.pop(); + if(comp == numbers[b]) { + seqLength++; + + } + else { + breakInLine = 1; + seqLength = 0; + // we have ended the symmetry, reset back to 0 + } + /*System.out.println(seqLength); + System.out.println("popped:" + comp); + System.out.println("b is:" + b); + System.out.println("compped to:" + numbers[b]);*/ + b++; + } + if(breakInLine == 0) { // double the count if we made it through the hole first half without issue + seqLength = seqLength *2; + } + //System.out.println(seqLength); + if(numbers.length%2 == 1 && (!reverse.isEmpty() || breakInLine == 0 || seqLength == 0)) { + seqLength++; // will need to add 1 if its odd, but only if no break, no sym, or not empty yet + } + //System.out.println(seqLength); + return seqLength; + } +} diff --git a/src/edu/nd/se2018/homework/hwk1/Question3Test.java b/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question3Test.java old mode 100644 new mode 100755 similarity index 89% rename from src/edu/nd/se2018/homework/hwk1/Question3Test.java rename to src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question3Test.java index 2103ee4d..8c77a214 --- a/src/edu/nd/se2018/homework/hwk1/Question3Test.java +++ b/src/edu/nd/se2018/homework/hwk1/src/edu/nd/se2018/homework/hwk1/Question3Test.java @@ -1,4 +1,4 @@ -package edu.nd.se2018.homework.hwk1; +package src.edu.nd.se2018.homework.hwk1; import org.junit.Test; public class Question3Test { diff --git a/src/edu/nd/se2018/homework/hwk2/.DS_Store b/src/edu/nd/se2018/homework/hwk2/.DS_Store new file mode 100644 index 00000000..5172429f Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk2/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk2/src/.DS_Store b/src/edu/nd/se2018/homework/hwk2/src/.DS_Store new file mode 100644 index 00000000..1f88b020 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk2/src/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/.DS_Store b/src/edu/nd/se2018/homework/hwk2/src/edu/.DS_Store new file mode 100644 index 00000000..535b4697 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk2/src/edu/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/.DS_Store b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/.DS_Store new file mode 100644 index 00000000..5859ba1b Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/.DS_Store b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/.DS_Store new file mode 100644 index 00000000..57a99912 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/.DS_Store b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/.DS_Store new file mode 100644 index 00000000..e4b5528a Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/.DS_Store b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/EarlySprinter.java b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/EarlySprinter.java new file mode 100644 index 00000000..d7221641 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/EarlySprinter.java @@ -0,0 +1,16 @@ +package src.edu.nd.se2018.homework.hwk2; + +public class EarlySprinter implements strategy { + @Override + public int moveForward(int pos, int maxSpeed) { + int delta = 0; + if(pos < 200) { + delta = maxSpeed; + } else { + delta = (int) ((int) maxSpeed * 0.75); + } + //System.out.println(pos + " " + delta +" ES "); + return delta; + } + +} diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/Main.java b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/Main.java new file mode 100644 index 00000000..8d9f5f56 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/Main.java @@ -0,0 +1,14 @@ +package src.edu.nd.se2018.homework.hwk2; + +public class Main { + + public static void main(String args[]) { + race Race1 = new race(); + Race1.addHorse("Sam",22,"EarlySprinter"); + Race1.addHorse("Molly",10,"EarlySprinter"); + Race1.addHorse("Joe",25,"EarlySprinter"); + Race1.addHorse("Blizzard",10,"EarlySprinter"); + Race1.addHorse("Flicker",30,"steadyRunner"); + Race1.runRace(); + } +} diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/Strategy and Reflection b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/Strategy and Reflection new file mode 100644 index 00000000..5e5a8596 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/Strategy and Reflection @@ -0,0 +1,15 @@ +Strategy and Reflection + +The strategy is set in horse, and is called through the setstrategy function that is present there. +This allowed for the set up to be cleaner in race where it was taking the input and you could create +the horse object simply. When setting that it is really just assigning it based on a case structure that +then runs in the horse class the "run" function that calls "moveForward" this is what is being implemented +in slowStarter.java, steadyRunner.java, and EarlySprinter.java. Move forward returns the jump that they make +in the unit of time. This seemed like a strait forward way to represent continuous time in a discrete +manner. This representation can also be better tuned easily by changing how many units represent 10 miles +and the size of the jumps or the speed that is used. This design decision made it so that the horse run function +out pass out to race, where using a map I was able to associate how much ground had been covered. + +Reflecting on this design I think I was happy with the build up into horses. I think building out a better version +of the hashmap that could have been used to sort or clean up the race in the event of ties. It would have helped +streamline my implementation and kept race easier to read. \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/UML_Diagram_ConnorGreen.pptx b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/UML_Diagram_ConnorGreen.pptx new file mode 100644 index 00000000..0ff9d3c8 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/UML_Diagram_ConnorGreen.pptx differ diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/horse.java b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/horse.java new file mode 100644 index 00000000..649a4527 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/horse.java @@ -0,0 +1,48 @@ +package src.edu.nd.se2018.homework.hwk2; + +public class horse { + private String name; + private int distanceTravelled; + private int topSpeed; + private strategy strat; + + + public horse(String Name, int speed, String str) { + this.name = Name; + this.topSpeed = speed; + setStrategy(str); + } + public void setStrategy(String str1) { //switch statement to change strategy + switch(str1) { + case "slowStarter": + // System.out.println("1"); + strat = new slowStarter(); + break; + case "EarlySprinter": + // System.out.println("2"); + strat = new EarlySprinter(); + break; + case "steadyRunner": + // System.out.println("3"); + strat = new steadyRunner(); + break; + default: + // System.out.println("4"); + strat = new steadyRunner(); + break; + } + } + public String getName() { + return this.name; + } + public int getD() { + return this.distanceTravelled; + } + public int run() { + int jump = this.strat.moveForward(this.distanceTravelled, topSpeed); + //System.out.println(jump + "this the the jump up"); + distanceTravelled += jump; // iterate the pos of the horse based on the strat implentation + return distanceTravelled; + } + +} diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/race.java b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/race.java new file mode 100644 index 00000000..6554f55c --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/race.java @@ -0,0 +1,85 @@ +package src.edu.nd.se2018.homework.hwk2; +import java.util.*; +import java.util.Map.Entry; + +public class race { + race() {}; + public HashMap< String,horse > raceTrack = new HashMap(); + public HashMap< String, Integer > status = new HashMap< String, Integer >(); + public HashMap< String, Integer > winnersCircle = new HashMap < String, Integer > (); + int numHorse = 0; + + + public void addHorse(String name, int speed, String strat) { + numHorse++; + if(numHorse > 5) { + System.out.println("Sorry, the race is already full "+ name +" can't join in"); + + }else if (speed < 1.33) {// this is the value that my integer casting would truncate to 0 and the horse would get stuck + System.out.println(name + " is too slow, that horse isn't going to go anywhere"); + numHorse--; // no need to add the horse the the count if he/she will not be racing + }else { + horse nextUp = new horse(name,speed,strat); + //System.out.println(nextUp.getName()); + //System.out.println(nextUp.getD()); + + status.put(nextUp.getName(), 0); // place each new horse at the beginning of the track + raceTrack.put(nextUp.getName(), nextUp); // then throw the horse into a container if we need information on it + } + + } + public void runRace() { + int finished = 0; + int updater = 0; + + while(finished != 1) { + updater++; + if((updater%5) == 0) {System.out.println(" ");} + for (Entry pair : status.entrySet()) { + if((updater%5) == 0) { + double update = Math.round(pair.getValue() * 100.0) / 10000.0; + if(update < 100) { // can still see if someone is close to tie on the final loop + System.out.println(pair.getKey() + " is at the " + update + " mile mark!"); // race updates + } + + } + if(pair.getValue() > 1000) { + winnersCircle.put(pair.getKey(),pair.getValue()); // this way if more than 1 horse if over 1000 we can find a winner + finished = 1; // will kick out because of the boolean + } + else { + String label = pair.getKey(); // grab the name of the horse we are working on + //System.out.println(pair.getKey()+ "here 1"); + horse current = raceTrack.get(label); // now we have the rest of that horses information + //System.out.println(current.getName() +" "+ current.getD() + "here 2"); + int newPos = current.run(); // we can use this to help it run with the given strategy it chose, and find its new spot + //System.out.println(newPos + " The newPos in race"); + status.put(pair.getKey(), newPos); // update the status of the horse to reflect its new position + } + } + if(!winnersCircle.isEmpty()) { // we need to go through the winners in case there is a tie + //System.out.println("Winner"); + // if it is bigger than 1, we need to check, else just print the 1 entry in the circle + System.out.println("The race has ended!"); + if(winnersCircle.size() > 1) { + System.out.println(" "); + System.out.println("It was too close to call so they will have to share"); + System.out.println("Your champions are:"); + for (Entry pair : winnersCircle.entrySet()) { + System.out.println(pair.getKey()); + } + + }else { + for(Entrypair : winnersCircle.entrySet()) { + System.out.println(" "); + System.out.println(pair.getKey() + " Wins!"); + } + } + } + } + + + + + } +} diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/raceTest.java b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/raceTest.java new file mode 100644 index 00000000..d6bc7c5f --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/raceTest.java @@ -0,0 +1,20 @@ +package src.edu.nd.se2018.homework.hwk2; + +import org.junit.jupiter.api.Test; + +class raceTest { + + @Test + // basic unit test + void test() { + race Test1 = new race(); + Test1.addHorse("Mike",25,"slowStarter"); + Test1.addHorse("Sam",22,"EarlySprinter"); + Test1.addHorse("Molly",30,"EarlySprinter"); + Test1.addHorse("Joe",25,"EarlySprinter"); + Test1.addHorse("Blizzard",20,"EarlySprinter"); + Test1.runRace(); + } + + +} diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/raceTest2.java b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/raceTest2.java new file mode 100644 index 00000000..dacbd271 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/raceTest2.java @@ -0,0 +1,19 @@ +package src.edu.nd.se2018.homework.hwk2; + + +import org.junit.jupiter.api.Test; + +class raceTest2 { + + @Test + // basic tie test + void test() { + race Test1 = new race(); + Test1.addHorse("Mike",25,"EarlySprinter"); + Test1.addHorse("Sam",25,"EarlySprinter"); + Test1.addHorse("Molly",25,"EarlySprinter"); + + Test1.runRace(); + } +} + diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/raceTest3.java b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/raceTest3.java new file mode 100644 index 00000000..e9bf777b --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/raceTest3.java @@ -0,0 +1,18 @@ +package src.edu.nd.se2018.homework.hwk2; + + +import org.junit.jupiter.api.Test; + +class raceTest3 { + + @Test + // Speed controls test, race should continue, but not with the horse thats too slow in it + void test() { + race Test1 = new race(); + Test1.addHorse("Mike",20,"EarlySprinter"); + Test1.addHorse("Sam",25,"EarlySprinter"); + Test1.addHorse("Molly",1,"EarlySprinter"); + + Test1.runRace(); + } +} diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/raceTest4.java b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/raceTest4.java new file mode 100644 index 00000000..63ea8f97 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/raceTest4.java @@ -0,0 +1,20 @@ +package src.edu.nd.se2018.homework.hwk2; + +import org.junit.jupiter.api.Test; + +class raceTest4 { + + @Test + // Size controls test, race should continue, but only with 5 horses. + void test() { + race Test1 = new race(); + Test1.addHorse("Mike1",20,"EarlySprinter"); + Test1.addHorse("Sam1",25,"EarlySprinter"); + Test1.addHorse("Molly1",30,"EarlySprinter"); + Test1.addHorse("Mike2",20,"EarlySprinter"); + Test1.addHorse("Sam2",25,"EarlySprinter"); + Test1.addHorse("Molly2",30,"EarlySprinter"); + + Test1.runRace(); + } +} diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/slowStarter.java b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/slowStarter.java new file mode 100644 index 00000000..170e8ee3 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/slowStarter.java @@ -0,0 +1,23 @@ +package src.edu.nd.se2018.homework.hwk2; + +public class slowStarter implements strategy { + @Override + public int moveForward(int pos, int maxSpeed) { + int nextSpot = 0; + int delta = 0; + if(pos < 600) { + delta = (int) (maxSpeed * 0.75); + nextSpot = delta + pos; + } else if (pos > 600 && pos < 900){ + delta = (int) ((int) maxSpeed * 0.9); + nextSpot = delta + pos; + } else { + delta = maxSpeed; + nextSpot = maxSpeed + pos; + } + nextSpot = pos + delta; + //System.out.println(pos + " " + delta + "SS"); + return delta; + } + +} diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/steadyRunner.java b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/steadyRunner.java new file mode 100644 index 00000000..2f6781ae --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/steadyRunner.java @@ -0,0 +1,13 @@ +package src.edu.nd.se2018.homework.hwk2; + +public class steadyRunner implements strategy{ + @Override + public int moveForward(int pos, int maxSpeed) { + + int delta = 0; + delta = (int) (maxSpeed * 0.8); + //System.out.println(pos + " " + delta + " SR "); + return delta; + } + +} diff --git a/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/strategy.java b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/strategy.java new file mode 100644 index 00000000..6164a700 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk2/src/edu/nd/se2018/homework/hwk2/strategy.java @@ -0,0 +1,5 @@ +package src.edu.nd.se2018.homework.hwk2; + +public interface strategy { + public int moveForward(int pos, int maxSpeed); +} diff --git a/src/edu/nd/se2018/homework/hwk4/.DS_Store b/src/edu/nd/se2018/homework/hwk4/.DS_Store new file mode 100644 index 00000000..5172429f Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk4/.classpath b/src/edu/nd/se2018/homework/hwk4/.classpath new file mode 100644 index 00000000..ac4a647f --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk4/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/edu/nd/se2018/homework/hwk4/.gitignore b/src/edu/nd/se2018/homework/hwk4/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk4/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/src/edu/nd/se2018/homework/hwk4/.project b/src/edu/nd/se2018/homework/hwk4/.project new file mode 100644 index 00000000..b481f7fa --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk4/.project @@ -0,0 +1,23 @@ + + + ColumbusGame1 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.jdt.core.javanature + + diff --git a/src/edu/nd/se2018/homework/hwk4/ClassDiagram.JPG b/src/edu/nd/se2018/homework/hwk4/ClassDiagram.JPG new file mode 100644 index 00000000..2a94a432 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/ClassDiagram.JPG differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/.DS_Store b/src/edu/nd/se2018/homework/hwk4/bin/.DS_Store new file mode 100644 index 00000000..5172429f Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/.gitignore b/src/edu/nd/se2018/homework/hwk4/bin/.gitignore new file mode 100644 index 00000000..9fed9070 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk4/bin/.gitignore @@ -0,0 +1,6 @@ +/Question1.class +/Question1Test.class +/Question2.class +/Question2Test.class +/Question3.class +/Question3Test.class diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/.DS_Store b/src/edu/nd/se2018/homework/hwk4/bin/application/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/ColumbusShip.png b/src/edu/nd/se2018/homework/hwk4/bin/application/ColumbusShip.png new file mode 100644 index 00000000..ab23f309 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/ColumbusShip.png differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/OceanExplorer$1.class b/src/edu/nd/se2018/homework/hwk4/bin/application/OceanExplorer$1.class new file mode 100644 index 00000000..d2834d6f Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/OceanExplorer$1.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/OceanExplorer.class b/src/edu/nd/se2018/homework/hwk4/bin/application/OceanExplorer.class new file mode 100644 index 00000000..18a1b814 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/OceanExplorer.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/OceanMap.class b/src/edu/nd/se2018/homework/hwk4/bin/application/OceanMap.class new file mode 100644 index 00000000..66a49920 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/OceanMap.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/Ship.class b/src/edu/nd/se2018/homework/hwk4/bin/application/Ship.class new file mode 100644 index 00000000..b4d781e3 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/Ship.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/Simulation$1.class b/src/edu/nd/se2018/homework/hwk4/bin/application/Simulation$1.class new file mode 100644 index 00000000..a82f3db1 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/Simulation$1.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/Simulation.class b/src/edu/nd/se2018/homework/hwk4/bin/application/Simulation.class new file mode 100644 index 00000000..126337bb Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/Simulation.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/application.css b/src/edu/nd/se2018/homework/hwk4/bin/application/application.css new file mode 100644 index 00000000..83d6f334 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk4/bin/application/application.css @@ -0,0 +1 @@ +/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */ \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/Direction.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/Direction.class new file mode 100644 index 00000000..7c403077 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/Direction.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/MapBuilder.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/MapBuilder.class new file mode 100644 index 00000000..a7cb72dd Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/MapBuilder.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/RailwayTracks.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/RailwayTracks.class new file mode 100644 index 00000000..2cdb9f8a Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/RailwayTracks.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/Road.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/Road.class new file mode 100644 index 00000000..b021fdaf Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/Road.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/CrossingGate.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/CrossingGate.class new file mode 100644 index 00000000..c3953d1e Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/CrossingGate.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/GateClosed.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/GateClosed.class new file mode 100644 index 00000000..cc2110bf Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/GateClosed.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/GateClosing.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/GateClosing.class new file mode 100644 index 00000000..d4afaaac Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/GateClosing.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/GateOpen.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/GateOpen.class new file mode 100644 index 00000000..c14e71de Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/GateOpen.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/GateOpening.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/GateOpening.class new file mode 100644 index 00000000..2e706a6a Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/GateOpening.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/IGateState.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/IGateState.class new file mode 100644 index 00000000..26261bf8 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/gate/IGateState.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/intersection.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/intersection.class new file mode 100644 index 00000000..6da99890 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/infrastructure/intersection.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/vehicles/Car.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/vehicles/Car.class new file mode 100644 index 00000000..d1eb3d67 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/vehicles/Car.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/vehicles/CarFactory.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/vehicles/CarFactory.class new file mode 100644 index 00000000..bef53c5a Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/vehicles/CarFactory.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/vehicles/IVehicle.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/vehicles/IVehicle.class new file mode 100644 index 00000000..00ecb944 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/vehicles/IVehicle.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/model/vehicles/Train.class b/src/edu/nd/se2018/homework/hwk4/bin/application/model/vehicles/Train.class new file mode 100644 index 00000000..a7d56965 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/model/vehicles/Train.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/pirateShip.class b/src/edu/nd/se2018/homework/hwk4/bin/application/pirateShip.class new file mode 100644 index 00000000..7ea82549 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/pirateShip.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/pirateship.gif b/src/edu/nd/se2018/homework/hwk4/bin/application/pirateship.gif new file mode 100644 index 00000000..c3bbfa28 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/pirateship.gif differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/view/CarImageSelector.class b/src/edu/nd/se2018/homework/hwk4/bin/application/view/CarImageSelector.class new file mode 100644 index 00000000..d7db74ad Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/view/CarImageSelector.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/view/IDisplay.class b/src/edu/nd/se2018/homework/hwk4/bin/application/view/IDisplay.class new file mode 100644 index 00000000..1f97580d Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/view/IDisplay.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/view/MapDisplay.class b/src/edu/nd/se2018/homework/hwk4/bin/application/view/MapDisplay.class new file mode 100644 index 00000000..da385701 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/view/MapDisplay.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/view/RoadDisplay.class b/src/edu/nd/se2018/homework/hwk4/bin/application/view/RoadDisplay.class new file mode 100644 index 00000000..70442764 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/view/RoadDisplay.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/application/view/TracksDisplay.class b/src/edu/nd/se2018/homework/hwk4/bin/application/view/TracksDisplay.class new file mode 100644 index 00000000..dec364ed Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/application/view/TracksDisplay.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/.DS_Store b/src/edu/nd/se2018/homework/hwk4/bin/src/.DS_Store new file mode 100644 index 00000000..1f88b020 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/.DS_Store b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/.DS_Store new file mode 100644 index 00000000..535b4697 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/.DS_Store b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/.DS_Store new file mode 100644 index 00000000..5859ba1b Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/.DS_Store b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/.DS_Store new file mode 100644 index 00000000..57a99912 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/.DS_Store b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/.DS_Store new file mode 100644 index 00000000..e4b5528a Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question1.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question1.class new file mode 100644 index 00000000..f7b6e64b Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question1.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question1Test.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question1Test.class new file mode 100644 index 00000000..8a1fc6b5 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question1Test.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question2.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question2.class new file mode 100644 index 00000000..2984f018 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question2.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question2Test.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question2Test.class new file mode 100644 index 00000000..0ceccd67 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question2Test.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question3.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question3.class new file mode 100644 index 00000000..98992c05 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question3.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question3Test.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question3Test.class new file mode 100644 index 00000000..301c7fea Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk1/Question3Test.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/.DS_Store b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/EarlySprinter.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/EarlySprinter.class new file mode 100644 index 00000000..27460ad3 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/EarlySprinter.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/Main.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/Main.class new file mode 100644 index 00000000..4d1bd0dd Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/Main.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/Strategy and Reflection b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/Strategy and Reflection new file mode 100644 index 00000000..5e5a8596 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/Strategy and Reflection @@ -0,0 +1,15 @@ +Strategy and Reflection + +The strategy is set in horse, and is called through the setstrategy function that is present there. +This allowed for the set up to be cleaner in race where it was taking the input and you could create +the horse object simply. When setting that it is really just assigning it based on a case structure that +then runs in the horse class the "run" function that calls "moveForward" this is what is being implemented +in slowStarter.java, steadyRunner.java, and EarlySprinter.java. Move forward returns the jump that they make +in the unit of time. This seemed like a strait forward way to represent continuous time in a discrete +manner. This representation can also be better tuned easily by changing how many units represent 10 miles +and the size of the jumps or the speed that is used. This design decision made it so that the horse run function +out pass out to race, where using a map I was able to associate how much ground had been covered. + +Reflecting on this design I think I was happy with the build up into horses. I think building out a better version +of the hashmap that could have been used to sort or clean up the race in the event of ties. It would have helped +streamline my implementation and kept race easier to read. \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/UML_Diagram_ConnorGreen.pptx b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/UML_Diagram_ConnorGreen.pptx new file mode 100644 index 00000000..0ff9d3c8 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/UML_Diagram_ConnorGreen.pptx differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/horse.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/horse.class new file mode 100644 index 00000000..11c3a303 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/horse.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/race.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/race.class new file mode 100644 index 00000000..0ed1a1d7 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/race.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/raceTest.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/raceTest.class new file mode 100644 index 00000000..ce77f4a2 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/raceTest.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/raceTest2.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/raceTest2.class new file mode 100644 index 00000000..a42fba91 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/raceTest2.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/raceTest3.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/raceTest3.class new file mode 100644 index 00000000..0aa67d37 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/raceTest3.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/raceTest4.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/raceTest4.class new file mode 100644 index 00000000..e415aff0 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/raceTest4.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/slowStarter.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/slowStarter.class new file mode 100644 index 00000000..70bb1c70 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/slowStarter.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/steadyRunner.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/steadyRunner.class new file mode 100644 index 00000000..e38cdfe8 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/steadyRunner.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/strategy.class b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/strategy.class new file mode 100644 index 00000000..a4477d7c Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/bin/src/edu/nd/se2018/homework/hwk2/strategy.class differ diff --git a/src/edu/nd/se2018/homework/hwk4/build.fxbuild b/src/edu/nd/se2018/homework/hwk4/build.fxbuild new file mode 100644 index 00000000..27eda056 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk4/build.fxbuild @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/edu/nd/se2018/homework/hwk4/reflection.txt b/src/edu/nd/se2018/homework/hwk4/reflection.txt new file mode 100644 index 00000000..b64d5a19 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk4/reflection.txt @@ -0,0 +1,3 @@ +Reflecting on the design used, I could see that as I became more comfortable with the javafx library I was more easily able to structure the builing, escpecially of images, with the end result of the program in mind. I would have liked to have more time to play around with what I called the "oceanGrid" this was what I used to store the infomration about the location of opbjects in the game. This was a really important data structure and I found myself having to add some workarounds to get it passed between classes. There is likely a better way to make the structure more fluid. It would also be good to have more live edits to oceanGrid. The islands were static, but I would have liked to design a game winning sequence, and maybe a high score for number of moves before the pirates catch you. + +With regards to the entend, I think reseting the game, given my build, would have been a GUI challange and not a variable one. My islands are all allocated randomly and dynamically as the background is being built. Then they are just marked in the oceanGrid, going back to my earlier point. Also, going more testing with the movement scale to make it more compeititive. diff --git a/src/edu/nd/se2018/homework/hwk4/src/application/.DS_Store b/src/edu/nd/se2018/homework/hwk4/src/application/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/src/application/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk4/src/application/ColumbusShip.png b/src/edu/nd/se2018/homework/hwk4/src/application/ColumbusShip.png new file mode 100644 index 00000000..ab23f309 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/src/application/ColumbusShip.png differ diff --git a/src/edu/nd/se2018/homework/hwk4/src/application/OceanExplorer.java b/src/edu/nd/se2018/homework/hwk4/src/application/OceanExplorer.java new file mode 100644 index 00000000..ad95fccc --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk4/src/application/OceanExplorer.java @@ -0,0 +1,115 @@ +package application; + +import java.util.LinkedList; +import java.util.List; + +import javafx.application.Application; +import javafx.collections.*; +import javafx.collections.FXCollections; +import javafx.event.EventHandler; +import javafx.stage.Stage; +import javafx.scene.Scene; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; +import javafx.scene.*; +import javafx.scene.layout.Pane; +import javafx.scene.input.KeyEvent; + + +public class OceanExplorer extends Application { + ObservableList root = FXCollections.observableArrayList(); + int scale = 24; + int[][] oceanGrid; + Ship ship = new Ship(); + Pane pane = new Pane(); + Scene ocean = new Scene(pane,600,600); + + LinkedList pirates = new LinkedList(); // container for pirate ships + // standard ship + Image _ship = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/src/edu/nd/se2018/homework/hwk4/src/application/ColumbusShip.png", 25, 25, true, true); + ImageView shipImage = new ImageView(_ship); + @Override + public void start(Stage primaryStage) { + try { + // build the pane + primaryStage.setScene(ocean); + primaryStage.show(); + + // draw the ocean on the scene + OceanMap oceanMap = new OceanMap(); + oceanMap.placeIslands(); + oceanGrid = oceanMap.drawMap(root, scale); + + + // put the grid on the scene + pane.getChildren().addAll(root); + + // put on the boat image + shipImage.setX(ship.getX()); + shipImage.setY(ship.getY()); + //pane.getChildren().add(shipImage); + pane.getChildren().add(shipImage); + + + // put the pirate ships on the scene + int numpirates = 1; + for(int i = 0; i < numpirates;i++) { + pirates.add(new pirateShip(oceanGrid)); + } + for(pirateShip pirate:pirates) { + pirate.getImageView().setX(pirate.getX()); + pirate.getImageView().setY(pirate.getY()); + pane.getChildren().add(pirate.getImageView()); + ship.addObserver(pirate); + pirate.defineRes(oceanGrid);// inform the hunters where the islands are as they get made + } + + // play the game + startGame(); + + + } catch(Exception e) { + e.printStackTrace(); + } + } + + + private void startGame(){ + // Create a keypressed handler + ocean.setOnKeyPressed(new EventHandler(){ + + @Override + public void handle(KeyEvent ke) { + switch(ke.getCode()){ + case RIGHT: + ship.goEast(oceanGrid); + break; + case LEFT: + ship.goWest(oceanGrid); + break; + case UP: + ship.goNorth(oceanGrid); + break; + case DOWN: + ship.goSouth(oceanGrid); + break; + default: + break; + } + + shipImage.setX(ship.getX()); + shipImage.setY(ship.getY()); + + } + }); + } + + + public static void main(String[] args) { + launch(args); + + + + + } +} diff --git a/src/edu/nd/se2018/homework/hwk4/src/application/OceanMap.java b/src/edu/nd/se2018/homework/hwk4/src/application/OceanMap.java new file mode 100644 index 00000000..0ac38250 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk4/src/application/OceanMap.java @@ -0,0 +1,44 @@ +package application; + +import javafx.scene.shape.*; +import javafx.scene.Node; +import java.util.Random; +import javafx.collections.ObservableList; +import javafx.scene.paint.Color; + +public class OceanMap { +//Maze + int[][] oceanGrid = new int[25][25]; + final int dimensions = 25; + + public int [][] drawMap(ObservableList root, int scale) { + for (int x = 0; x < dimensions; x++) { + for (int y = 0; y < dimensions;y++) { + Rectangle rect = new Rectangle(y*scale, x*scale,scale,scale); + rect.setStroke(Color.BLACK); + if(oceanGrid[x][y]==1) { + rect.setFill(Color.GREEN); + }else { + rect.setFill(Color.TURQUOISE); + oceanGrid[x][y] = 0; + } + root.add(rect); + } + } + return oceanGrid; + } + public void placeIslands() { + Random random = new Random(); + int numIslands = 10; + for (int i = 0; i < numIslands; i++) { + int xAxis = random.nextInt(23)+1;// keep it out of the way of the pirates entering the water + int yAxis = random.nextInt(24); + if(oceanGrid[xAxis][yAxis]==1 || (xAxis == 10 && yAxis ==10)) { + i--; //iterate down in count if it wants to make the boat an island or double paste an island + } else { + oceanGrid[xAxis][yAxis] = 1; // flag as an island + + } + } +} +} diff --git a/src/edu/nd/se2018/homework/hwk4/src/application/Ship.java b/src/edu/nd/se2018/homework/hwk4/src/application/Ship.java new file mode 100644 index 00000000..cb74eb45 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk4/src/application/Ship.java @@ -0,0 +1,53 @@ +package application; + +import java.util.Observable; + +public class Ship extends Observable{ +// seeker + + + int xLocal = 240; + int yLocal = 240; + + public int getX() { + return xLocal; + } + public int getY() { + return yLocal; + } + public void goWest(int [][] oceanGrid) { + if(xLocal - 24 >= 0 && goodMove(xLocal-24,yLocal,oceanGrid)) { + xLocal = xLocal - 24; + setChanged(); + notifyObservers(); + } + } + public void goEast(int [][] oceanGrid) { + if(xLocal + 24 < 600 && goodMove(xLocal+24,yLocal,oceanGrid)) { + xLocal = xLocal + 24; + setChanged(); + notifyObservers(); + } + } + public void goNorth(int [][] oceanGrid) { + if(yLocal - 24 >= 0 && goodMove(xLocal,yLocal-24,oceanGrid)) { + yLocal = yLocal - 24; + setChanged(); + notifyObservers(); + } + } + public void goSouth(int [][] oceanGrid) { + if(yLocal + 24 < 600 && goodMove(xLocal,yLocal+24,oceanGrid)) { // bound check + logic + yLocal = yLocal + 24; + setChanged(); // update the pirate class + notifyObservers(); + } + } + public boolean goodMove(int x, int y, int[][] oceanGrid) { + if (oceanGrid[y/24][x/24] == 0) { // check oceanGrid to see if the move is vallid + return true; + }else { + return false; + } + } +} diff --git a/src/edu/nd/se2018/homework/hwk4/src/application/application.css b/src/edu/nd/se2018/homework/hwk4/src/application/application.css new file mode 100644 index 00000000..83d6f334 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk4/src/application/application.css @@ -0,0 +1 @@ +/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */ \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/hwk4/src/application/pirateShip.java b/src/edu/nd/se2018/homework/hwk4/src/application/pirateShip.java new file mode 100644 index 00000000..97990adc --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk4/src/application/pirateShip.java @@ -0,0 +1,87 @@ +package application; + +import java.util.Observable; +import java.util.Observer; +import java.util.Random; + +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; + +public class pirateShip implements Observer { + + public int pirateX = 0; + public int pirateY = 0; + public int [][]restricted; + int sailorX = 0; + int sailorY = 0; + Random rand = new Random(); + int scale = 24; + Image pImage; + public ImageView pShip; + + public pirateShip(int [][] oceanGrid){ // built constructor so that I can build out the list of pirates in main. + restricted = oceanGrid; + pirateX = rand.nextInt(24) * scale; + pImage = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/src/edu/nd/se2018/homework/hwk4/src/application/pirateship.gif", 25, 25, true, true); + pShip = new ImageView(pImage); + oceanGrid[0][pirateX/24] = 2; // set the pirate in motion on the board + } + + public ImageView getImageView(){ + return pShip; + } + public int getX() { + return pirateX; + } + public int getY() { + return pirateY; + } + + public void hunt() { + if (pirateX - sailorX < 0) { + if(resCheck(pirateX+24,pirateY)) { + pirateX = pirateX+24; + } + } + else { + if(resCheck(pirateX-24,pirateY)) { + pirateX = pirateX-24; + + } + } + if (pirateY - sailorY < 0) { + if(resCheck(pirateX,pirateY+24)) { + pirateY = pirateY+24; + } + } + else { + if(resCheck(pirateX,pirateY-24)) { + pirateY = pirateY-24; + } + } + pShip.setX(pirateX); + pShip.setY(pirateY); + } + public boolean resCheck(int x, int y) { // check if the ship is going to be pushed into restrictive space + if(restricted[y/24][x/24] == 1 || restricted[y/24][x/24] == 2 || (( x<0 || x > 600 )|| (y < 0 || y > 600))) { + return false; + }else { + //System.out.println("Good Move"); + return true; + } + } + + public void defineRes(int [][] res) { + restricted = res; // grab a copy of the map for the pirate ship to reference + } + @Override + public void update(Observable s, Object arg) { + if (s instanceof Ship){ //update status of the observed class + sailorX = ((Ship)s).getX(); + sailorY = ((Ship)s).getY(); + hunt(); + } + + } + +} diff --git a/src/edu/nd/se2018/homework/hwk4/src/application/pirateship.gif b/src/edu/nd/se2018/homework/hwk4/src/application/pirateship.gif new file mode 100644 index 00000000..c3bbfa28 Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk4/src/application/pirateship.gif differ diff --git a/src/edu/nd/se2018/homework/hwk5/.DS_Store b/src/edu/nd/se2018/homework/hwk5/.DS_Store new file mode 100644 index 00000000..001d2aba Binary files /dev/null and b/src/edu/nd/se2018/homework/hwk5/.DS_Store differ diff --git a/src/edu/nd/se2018/homework/hwk5/reflection/question1 b/src/edu/nd/se2018/homework/hwk5/reflection/question1 new file mode 100644 index 00000000..1784cbbd --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/reflection/question1 @@ -0,0 +1,18 @@ +To approach the design process, I tried to figure out how all the different classes related to eachother. +The first question I was able to address by tweaking the code that was already present. Adding the second +train and track was easier given the fact that those were done in simulation. The cars were already +set up to work within the gates present, so I was able to link the gate to the second train by adding it +to the observer present. Initally it would respond incorrectly to a new train coming in, so I created +some logic that checked with both trains before opening the gate to let cars through.Ideally I think +creating a method to automate this process would be ideal going foward, however it was addressed with +incrimental design. + +Moving to the second task, I origionally tried to approach it in the same way. When that didn't work, I +believe since the roads/car factories are independent. I tried to create an intersection class, that I could +then assign to the spot that the cars traveling east -> west would have to interact with. I wasn't able to +intergrate this into the design. I wanted to affect car.move(), which was called in car factory, but wasn't +able to pass the cars on the road into that. To address the movement, however, I was able to get the cars to +move over to the other side, using the logic in car move based on what side of the track that was on. These +changes, didn't impact the overall design, and were built into the classes present. I was hoping to use the +intersection class to build on that functionality, and set it up on both sides you could easily send cars both +ways and I think would be the major goal going foward. diff --git a/src/edu/nd/se2018/homework/hwk5/reflection/question2 b/src/edu/nd/se2018/homework/hwk5/reflection/question2 new file mode 100644 index 00000000..9914c38c --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/reflection/question2 @@ -0,0 +1,4 @@ +The intersection class, if continued to build up would be helpful. as well as the logic behind syncing the gate. This would +allow for things like a different sized train, or more gates to be added and the cars will still not cross wrongly. What would +not scale well would be the turing logic. Since it is based on car location you would need to go in a map all the intersections +based on cordinates instead of being able to drag and drop an intersection if one was added or not mapped in the first place. diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/Simulation.java b/src/edu/nd/se2018/homework/hwk5/src/application/Simulation.java new file mode 100644 index 00000000..469abe82 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/Simulation.java @@ -0,0 +1,116 @@ +package application; + +import java.util.ArrayList; +import java.util.Collection; + +import application.model.infrastructure.MapBuilder; +import application.model.infrastructure.RailwayTracks; +import application.model.infrastructure.Road; +import application.model.infrastructure.intersection; +import application.model.infrastructure.gate.CrossingGate; +import application.model.vehicles.Car; +import application.model.vehicles.Train; +import application.view.MapDisplay; +import javafx.animation.AnimationTimer; +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; + +public class Simulation extends Application{ + + private Pane root; + private Scene scene; + private MapBuilder mapBuilder; + private MapDisplay mapDisplay; + private intersection I; + + @Override + public void start(Stage stage) throws Exception { + + root = new Pane(); + + // Build infrastructure + mapBuilder = new MapBuilder(); + mapDisplay = new MapDisplay(root, mapBuilder.getRoads(), mapBuilder.getTracks(),mapBuilder.getAllGates()); + mapDisplay.drawTracks(); + mapDisplay.drawRoad(); + mapDisplay.drawGate(); + + + scene = new Scene(root,1200,1000); + stage.setTitle("Railways"); + stage.setScene(scene); + stage.show(); + + + // Train + RailwayTracks track = mapBuilder.getTrack("Royal"); + Train train = new Train(track.getEndX()+100,track.getEndY()-25,true); + root.getChildren().add(train.getImageView()); + // train 2 + RailwayTracks track2 = mapBuilder.getTrack("Royal2"); + Train train2 = new Train(track2.getEndX()-1300,track2.getEndY()+75,false); + root.getChildren().add(train2.getImageView()); + + for(CrossingGate gate: mapBuilder.getAllGates()) { + train.addObserver(gate); + train2.addObserver(gate); + } + + // Sets up a repetitive loop i.e., in handle that runs the actual simulation + new AnimationTimer(){ + + @Override + public void handle(long now) { + + createCar(); + //if(I.intersectionCheck(mapBuilder.getRoads())) + train.move(); + train2.moveB(); + + for(CrossingGate gate: mapBuilder.getAllGates()) + gate.operateGate(); + + if (train.offScreen()) + train.reset(); + if (train2.offScreen()) + train2.resetL(); + + clearCars(); + } + }.start(); + } + + // Clears cars as they leave the simulation + private void clearCars(){ + Collection roads = mapBuilder.getRoads(); + for(Road road: roads){ + if (road.getCarFactory()!= null){ + ArrayList junkCars = road.getCarFactory().removeOffScreenCars(); + mapDisplay.removeCarImages(junkCars); + } + } + } + + private void createCar(){ + Collection roads = mapBuilder.getRoads(); + for(Road road: roads){ + if (road.getCarFactory() != null){ + if ((int)(Math.random() * 100) == 15){ + Car car = road.getCarFactory().buildCar(); + // send a valid move to the car.move() + if (car != null){ + root.getChildren().add(car.getImageView()); + } + } + } + } + + } + + public static void main(String[] args){ + launch(args); + } +} + diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/Direction.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/Direction.java new file mode 100644 index 00000000..fb90f912 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/Direction.java @@ -0,0 +1,9 @@ +package application.model.infrastructure; + +public enum Direction { + NORTH, + SOUTH, + EAST, + WEST, + CUSTOM; +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/MapBuilder.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/MapBuilder.java new file mode 100644 index 00000000..6f29f133 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/MapBuilder.java @@ -0,0 +1,71 @@ +package application.model.infrastructure; + +import java.awt.Point; +import java.util.Collection; +import java.util.HashMap; + +import application.model.infrastructure.gate.CrossingGate; + +/** + * Creates all infrastructure for the simulation + * @author jane + * + */ +public class MapBuilder { + HashMap roads; + HashMap gates; + HashMap tracks; + + public MapBuilder(){ + roads = new HashMap(); + gates = new HashMap(); + tracks = new HashMap(); + buildRoads(); + buildCrossingGates(); + buildTracks(); + assignGatesToRoads(); + buildCarFactories(); + } + + private void buildRoads(){ + roads.put("Western Highway",new Road(new Point(800,0),new Point (800,1000),Direction.SOUTH,true,false)); + roads.put("Skyway",new Road(new Point(400,0),new Point (400,1000),Direction.SOUTH,true,false)); + roads.put("EastWest",new Road(new Point(418,700),new Point (782,700),Direction.EAST,true,true)); + } + + private void buildCrossingGates(){ + gates.put("Gate1", new CrossingGate(780,480, "Gate1")); + gates.put("Gate2", new CrossingGate(380,480, "Gate2")); + } + + private void buildTracks(){ + tracks.put("Royal", new RailwayTracks(new Point(0,500),new Point(1200,500))); + tracks.put("Common", new RailwayTracks(new Point(0,600),new Point(1200,600))); + } + + private void assignGatesToRoads(){ + roads.get("Western Highway").assignGate(gates.get("Gate1")); + roads.get("Skyway").assignGate(gates.get("Gate2")); + } + + private void buildCarFactories(){ + roads.get("Western Highway").addCarFactory(); + roads.get("Skyway").addCarFactory(); + } + + public Collection getAllGates(){ + return gates.values(); + } + + public Collection getTracks(){ + return tracks.values(); + } + + public Collection getRoads(){ + return roads.values(); + } + + public RailwayTracks getTrack(String name){ + return tracks.get("Royal"); + } +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/RailwayTracks.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/RailwayTracks.java new file mode 100644 index 00000000..b35b0c1e --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/RailwayTracks.java @@ -0,0 +1,46 @@ +package application.model.infrastructure; + +import java.awt.Point; + +/** + * Railway Tracks (Entity Object) + * @author Jane Cleland-Huang + * + */ +public class RailwayTracks { + + private int startX; + private int endX; + private int startY; + private int endY; + + public RailwayTracks(){} + + public RailwayTracks(Point startPoint, Point endPoint){ + startX = startPoint.x; + startY = startPoint.y; + endX = endPoint.x; + endY = endPoint.y; + } + + public int getStartX(){ + return startX; + } + + public int getEndX(){ + return endX; + } + + public int getStartY(){ + return startY; + } + + public int getEndY(){ + return endY; + } + + @Override + public String toString(){ + return "Tracks from (" + startX + "," + startY + ") to (" + endX + "," + endY + ")"; + } +} \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/Road.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/Road.java new file mode 100644 index 00000000..0f9fa76e --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/Road.java @@ -0,0 +1,86 @@ +package application.model.infrastructure; + +import java.awt.Point; +import java.util.Collection; +import java.util.Vector; + +import application.model.infrastructure.gate.CrossingGate; +import application.model.vehicles.CarFactory; + +/** + * Represents a single road + * @author jane + * + */ +public class Road { + private int startX; + private int endX; + private int startY; + private int endY; + private CarFactory carFactory; + Direction direction; + Collection gates; + boolean clearEnds = false; + int roadSize; + + public Road(){} + + public Road(Point start, Point end, Direction direction, boolean buildCarFactory, boolean clearEnds){ + startX = start.x; + startY = start.y; + endX = end.x; + endY = end.y; + roadSize = 18; + + this.direction = direction; + gates = new Vector(); + this.clearEnds = clearEnds; + + } + + // Adds a gate to a road + // In case a new gate is added after the factory is assigned, we reassign factory + // The factory needs to know all gates on the road in order to register each car as an observer. + public void assignGate(CrossingGate gate){ + gates.add(gate); + if (carFactory != null) + carFactory = new CarFactory(direction, new Point(startX-roadSize/2,startY), gates); // allows additional gates. Needs fixing + } + + public void addCarFactory(){ + if (carFactory == null) // We only allow one + carFactory = new CarFactory(direction, new Point(startX-roadSize/2,startY), gates); + } + + public CarFactory getCarFactory(){ + return carFactory; + } + + public int getStartX(){ + return startX; + } + + public int getEndX(){ + return endX; + } + + public int getStartY(){ + return startY; + } + + public int getEndY(){ + return endY; + } + + public Direction getDirection(){ + return direction; + } + + public boolean getClearEnds(){ + return clearEnds; + } + + public int getRoadWidth(){ + return roadSize; + } +} \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/CrossingGate.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/CrossingGate.java new file mode 100644 index 00000000..8a980e55 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/CrossingGate.java @@ -0,0 +1,144 @@ +package application.model.infrastructure.gate; + +import java.util.Observable; +import java.util.Observer; + +import application.model.vehicles.Train; +import javafx.scene.layout.Pane; +import javafx.scene.paint.Color; +import javafx.scene.shape.Line; + +/** + * Context class for Crossing Gate + * @author jane + * + */ +public class CrossingGate extends Observable implements Observer{ + + // Crossing Gate location and its trigger & exit points + private int anchorX; + private int anchorY; + private int movingX; + private int movingY; + private int triggerPoint; + private int exitPoint; + private int gate = 0; + + private IGateState gateClosed; + private IGateState gateOpen; + private IGateState gateClosing; + private IGateState gateOpening; + private IGateState currentGateState; + private Line line; + private Pane root; + + String gateName; + + public CrossingGate(){} + + public CrossingGate(int xPosition, int yPosition, String crossingGate){ + anchorX = xPosition; + anchorY = yPosition; + movingX = anchorX; + movingY = anchorY-60; + triggerPoint = anchorX+300; + exitPoint = anchorX-300; + + // Gate elements + line = new Line(anchorX, anchorY,movingX,movingY); + line.setStroke(Color.RED); + line.setStrokeWidth(10); + + // Gate States + gateClosed = new GateClosed(this); + gateOpen = new GateOpen(this); + gateOpening = new GateOpening(this); + gateClosing = new GateClosing(this); + currentGateState = gateOpen; + gateName = crossingGate; + } + + public Line getGateLine(){ + return line; + } + + public void operateGate(){ + currentGateState.operate(); + } + + public void close(){ + if (movingYanchorX){ + movingX-=1; + movingY-=1; + line.setStartX(anchorX); + line.setStartY(anchorY); + line.setEndX(movingX); + line.setEndY(movingY); + } else { + currentGateState.gateFinishedOpening(); + } + } + + // State getters and setters + public IGateState getGateClosedState(){ + return gateClosed; + } + public IGateState getGateOpenState(){ + return gateOpen; + } + public IGateState getGateClosingState(){ + return gateClosing; + } + public IGateState getGateOpeningState(){ + return gateOpening; + } + + public void setGateState(IGateState newState){ + currentGateState = newState; + setChanged(); + notifyObservers(); + } + + public String getTrafficCommand(){ + return currentGateState.getTrafficAction(); + } + + @Override + public void update(Observable o, Object arg) { + if (o instanceof Train){ + Train train = (Train)o; + if(train.getDir()==true) { // train is going right to left + if(train.getVehicleX() < exitPoint){ + gate = gate + 1; + }else if (train.getVehicleX() < triggerPoint) { + currentGateState.approachStation(); + } + }else if(train.getDir() == false){ // train is going left to right + if (train.getVehicleX() > triggerPoint) { + gate = gate + 1; + } + else if(train.getVehicleX() > exitPoint){ + currentGateState.approachStation(); + } + } + if(gate == 2) { + currentGateState.leaveStation(); + gate = 0; + } + } + + } +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/GateClosed.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/GateClosed.java new file mode 100644 index 00000000..da46554b --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/GateClosed.java @@ -0,0 +1,49 @@ +package application.model.infrastructure.gate; + +/** + * Gate in CLOSED state + * @author jane + * + */ +public class GateClosed implements IGateState { + + private CrossingGate gate; + + protected GateClosed(CrossingGate gate){ + this.gate = gate; + } + + @Override + public void approachStation() { + // Do nothing. Gate is already closed. + // IF there were two tracks we would have to keep track of how many trains were in the station! + } + + @Override + public void leaveStation() { + gate.setGateState(gate.getGateOpeningState()); + } + + @Override + public void gateFinishedOpening() { + // not applicable + } + + @Override + public void gateFinishedClosing() { + // not applicable. Gate is already closed. + } + + @Override + public void operate() { + // Flash lights + + } + + @Override + public String getTrafficAction() { + return "STOP"; + } + + +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/GateClosing.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/GateClosing.java new file mode 100644 index 00000000..3e19f0bf --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/GateClosing.java @@ -0,0 +1,50 @@ +package application.model.infrastructure.gate; + +/** + * Gate in closing state + * @author jane + * + */ +public class GateClosing implements IGateState{ + + private CrossingGate gate; + + protected GateClosing(CrossingGate gate){ + this.gate = gate; + } + + @Override + public void approachStation() { + // Gate is already closing + } + + @Override + public void leaveStation() { + // This was an unwanted event. The gate wasn't fully closed when the train was in the station. + // Nevertheless we will open the gate. + gate.setGateState(gate.getGateOpeningState()); + } + + @Override + public void gateFinishedOpening() { + // n/a + } + + @Override + public void gateFinishedClosing() { + gate.setGateState(gate.getGateClosedState()); + } + + @Override + public void operate() { + gate.close(); + // flash lights + } + + @Override + public String getTrafficAction() { + return "STOP"; + } + + +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/GateOpen.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/GateOpen.java new file mode 100644 index 00000000..6d4c7f4c --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/GateOpen.java @@ -0,0 +1,46 @@ +package application.model.infrastructure.gate; + +/** + * Gate in open state + * @author jane + * + */ +public class GateOpen implements IGateState { + + private CrossingGate gate; + + protected GateOpen(CrossingGate gate){ + this.gate = gate; + } + + @Override + public void approachStation() { + gate.setGateState(gate.getGateClosingState()); + } + + @Override + public void leaveStation() { + // n/a gate already open + } + + @Override + public void gateFinishedOpening() { + // n/a gate already open + } + + @Override + public void gateFinishedClosing() { + // n/a can't be closing and opened. + } + + @Override + public void operate() { + // Normal operation. Do nothing. + } + + @Override + public String getTrafficAction() { + return "GO"; + } + +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/GateOpening.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/GateOpening.java new file mode 100644 index 00000000..96a4b2a3 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/GateOpening.java @@ -0,0 +1,48 @@ +package application.model.infrastructure.gate; + +/** + * Gate in opening state + * @author jane + * + */ +public class GateOpening implements IGateState{ + + CrossingGate gate; + + protected GateOpening(CrossingGate gate){ + this.gate = gate; + } + + @Override + public void approachStation() { + gate.setGateState(gate.getGateClosingState()); + } + + @Override + public void leaveStation() { + // Already opening. + } + + @Override + public void gateFinishedOpening() { + gate.setGateState(gate.getGateOpenState()); + } + + @Override + public void gateFinishedClosing() { + // not reachable except through error. + // Raise an alarm!! + } + + @Override + public void operate() { + gate.open(); + // Flash lights.. + } + + @Override + public String getTrafficAction() { + return "STOP"; + } + +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/IGateState.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/IGateState.java new file mode 100644 index 00000000..65501ea1 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/gate/IGateState.java @@ -0,0 +1,15 @@ +package application.model.infrastructure.gate; + +/** + * Declares all operations that GateState classes must implement + * @author jane + * + */ +public interface IGateState { + public void approachStation(); + public void leaveStation(); + public void gateFinishedOpening(); + public void gateFinishedClosing(); + public void operate(); + public String getTrafficAction(); +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/intersection.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/intersection.java new file mode 100644 index 00000000..1037e5b0 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/infrastructure/intersection.java @@ -0,0 +1,38 @@ +package application.model.infrastructure; + +import java.util.ArrayList; +import java.util.Collection; +import application.model.infrastructure.Road; +import application.model.vehicles.Car; +import application.model.infrastructure.MapBuilder; + + +public class intersection { + private ArrayList cars = new ArrayList(); + private Collection roads; + + + + public intersection(Collection roads1) { + roads = roads1; + } + + + + + public boolean intersectionCheck(Collection roads) { + + for(Road road:roads) { + cars = road.getCarFactory().getCars(); + for(Car car:cars) { + if(car.getVehicleX() < 500 && (car.getVehicleY() > 600 && car.getVehicleY() < 800)) { + return true; + }else { + return false; + } + } + } + return false; + } + +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/vehicles/Car.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/vehicles/Car.java new file mode 100644 index 00000000..719b44d0 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/vehicles/Car.java @@ -0,0 +1,130 @@ +package application.model.vehicles; + +import java.util.Observable; +import java.util.Observer; +import java.util.Random; + +import application.model.infrastructure.gate.CrossingGate; +import application.view.CarImageSelector; +import javafx.scene.Node; +import javafx.scene.image.ImageView; + +/** + * Represents Car object + * @author jane + * + */ +public class Car extends Observable implements IVehicle, Observer{ + private ImageView ivCar; + private double currentX = 0; + private double currentY = 0; + private double originalY = 0; + private boolean gateDown = false; + private double leadCarY = -1; // Current Y position of car directly infront of this one + private double speed = 0.25; + private double swerve = 0; + + /** + * Constructor + * @param x initial x coordinate of car + * @param y initial y coordinate of car + */ + public Car(int x, int y){ + Random r = new Random(); + this.swerve= r.nextInt(10); + this.currentX = x; + this.currentY = y; + originalY = y; + ivCar = new ImageView(CarImageSelector.getImage()); + ivCar.setX(getVehicleX()); + ivCar.setY(getVehicleY()); + } + + @Override + public Node getImageView() { + return ivCar; + } + + public boolean gateIsClosed(){ + return gateDown; + } + + public double getVehicleX(){ + return currentX; + } + public double getVehicleY(){ + return currentY; + } + + public void move(){ + boolean canMove = true; + + // First case. Car is at the front of the stopping line. + if (gateDown && getVehicleY() < 430 && getVehicleY()> 390) + canMove = false; + + // Second case. Car is too close too other car. + if (leadCarY != -1 && getDistanceToLeadCar() < 50) + canMove = false; + + if (canMove){ + if(swerve > 7 && currentY > 700 && currentX > 385) { + leadCarY = -1; + currentX -= speed*2; + ivCar.setX(currentX); + removeLeadCar(); + }else { + currentY+=speed; + ivCar.setY(currentY); + } + } + + setChanged(); + notifyObservers(); + } + + public void setSpeed(double speed){ + this.speed = speed; + } + + public void setGateDownFlag(boolean gateDown){ + this.gateDown = gateDown; + } + + public boolean offScreen(){ + if (currentY > 1020) + return true; + else + return false; + } + + public void reset(){ + currentY = originalY; + } + + public double getDistanceToLeadCar(){ + return Math.abs(leadCarY-getVehicleY()); + } + + public void removeLeadCar(){ + leadCarY = -1; + } + + @Override + public void update(Observable o, Object arg1) { + if (o instanceof Car){ + leadCarY = (((Car)o).getVehicleY()); + if (leadCarY > 1020) + leadCarY = -1; + } + + if (o instanceof CrossingGate){ + CrossingGate gate = (CrossingGate)o; + if(gate.getTrafficCommand()=="STOP") + gateDown = true; + else + gateDown = false; + + } + } +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/vehicles/CarFactory.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/vehicles/CarFactory.java new file mode 100644 index 00000000..14159a71 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/vehicles/CarFactory.java @@ -0,0 +1,78 @@ +package application.model.vehicles; + +import java.awt.Point; +import java.util.ArrayList; +import java.util.Collection; + +import application.model.infrastructure.Direction; +import application.model.infrastructure.gate.CrossingGate; + + +/** + * Very basic car factory. Creates the car and registers it with the crossing gate and the car infront of it. + * @author jane + * + */ +public class CarFactory { + + private Collection gates = null; + private Car previousCar = null; + private ArrayList cars = new ArrayList(); + Direction direction; + Point location; + + public CarFactory(){} + + public CarFactory(Direction direction, Point location, Collection gates){ + this.direction = direction; + this.location = location; + this.gates = gates; + } + + + // Most code here is to create random speeds + public Car buildCar(){ + if (previousCar == null || location.y < previousCar.getVehicleY()-100){ + Car car = new Car(location.x,location.y); + double speedVariable = (Math.random() * 10)/10; + car.setSpeed((2-speedVariable)*1.5); + + // All cars created by this factory must be aware of crossing gates in the road + for(CrossingGate gate: gates){ + gate.addObserver(car); + if(gate != null && gate.getTrafficCommand()=="STOP") + car.setGateDownFlag(false); + } + + // Each car must observe the car infront of it so it doesn't collide with it. + if (previousCar != null) + previousCar.addObserver(car); + previousCar = car; + + cars.add(car); + return car; + } else + return null; + } + public ArrayList getCars(){ + return cars; + } + + // We will get a concurrency error if we try to delete cars whilst iterating through the array list + // so we perform this in two stages. + // 1. Loop through the list and identify which cars are off the screen. Add them to 'toDelete' array. + // 2. Iterate through toDelete and remove the cars from the original arrayList. + public ArrayList removeOffScreenCars() { + // Removing cars from the array list. + ArrayList toDelete = new ArrayList(); + for(Car car: cars){ + car.move(); + if (car.offScreen()) + toDelete.add(car); + + } + for (Car car: toDelete) + cars.remove(car); + return toDelete; + } +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/vehicles/IVehicle.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/vehicles/IVehicle.java new file mode 100644 index 00000000..5b3cdb6b --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/vehicles/IVehicle.java @@ -0,0 +1,13 @@ +package application.model.vehicles; + +import javafx.scene.Node; + + +public interface IVehicle { + public Node getImageView(); + public double getVehicleX(); + public double getVehicleY(); + public void move(); + public boolean offScreen(); + public void reset(); +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/model/vehicles/Train.java b/src/edu/nd/se2018/homework/hwk5/src/application/model/vehicles/Train.java new file mode 100644 index 00000000..4da5230d --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/model/vehicles/Train.java @@ -0,0 +1,80 @@ +package application.model.vehicles; + +import java.util.Observable; + +import javafx.scene.Node; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; + +/** + * Represents the train entity object + * @author jane + * + */ +public class Train extends Observable implements IVehicle{ + private double currentX = 0; + private double currentY = 0; + private double originalX = 0; + private Image img; + private ImageView imgView; + private int trainLength = 35; + private boolean dir = true; // right direction + + public Train(int x, int y, boolean dir){ + this.dir = dir; + this.currentX = x; + this.currentY = y; + originalX = x; + if(dir) { + img = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/src/images/Train.PNG",120,trainLength,false,false); + }else { + img = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/src/images/TrainReverse.PNG",120,trainLength,false,false); + } + imgView = new ImageView(img); + imgView.setX(currentX); + imgView.setY(currentY); + } + public boolean getDir() { + return dir; + } + + public double getVehicleX(){ + return currentX; + } + + public double getVehicleY(){ + return currentY; + } + + public void move(){ + currentX-=2; + imgView.setX(currentX); + setChanged(); + notifyObservers(); + } + public void moveB() { + currentX+=2; + imgView.setX(currentX); + setChanged(); + notifyObservers(); + } + + public boolean offScreen(){ + if (currentX < -200 || currentX > 1400) + return true; + else + return false; + } + + public void reset(){ + currentX = originalX; + } + public void resetL(){ + currentX = -200; + } + + //@Override + public Node getImageView() { + return imgView; + } +} \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/view/CarImageSelector.java b/src/edu/nd/se2018/homework/hwk5/src/application/view/CarImageSelector.java new file mode 100644 index 00000000..3bab1b64 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/view/CarImageSelector.java @@ -0,0 +1,23 @@ +package application.view; + +import javafx.scene.image.Image; + +public class CarImageSelector { + + + public static Image getImage(){ + int imageSize = 20; + int pickNum = (int)(Math.random() * 4); + Image img; + switch(pickNum){ + case 0: img = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/src/images/bluecar.PNG",imageSize,imageSize,false,true); + break; + case 2: img = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/src/images/graycar.PNG",imageSize,imageSize,false,true); + break; + case 3: img = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/src/images/greencar.PNG",imageSize,imageSize,false,true); + break; + default: img = new Image("file:/Users/connorgreen/git/SoftwareEngineering2018/src/images/redcar.PNG",imageSize,imageSize,false,true); + } + return img; + } +} \ No newline at end of file diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/view/IDisplay.java b/src/edu/nd/se2018/homework/hwk5/src/application/view/IDisplay.java new file mode 100644 index 00000000..246a89a2 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/view/IDisplay.java @@ -0,0 +1,5 @@ +package application.view; + +public interface IDisplay { + public void draw(); +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/view/MapDisplay.java b/src/edu/nd/se2018/homework/hwk5/src/application/view/MapDisplay.java new file mode 100644 index 00000000..31dd6779 --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/view/MapDisplay.java @@ -0,0 +1,53 @@ +package application.view; + +import java.util.ArrayList; +import java.util.Collection; + +import application.model.infrastructure.RailwayTracks; +import application.model.infrastructure.Road; +import application.model.infrastructure.gate.CrossingGate; +import application.model.vehicles.Car; +import javafx.scene.layout.Pane; + +/** + * Called by JavaFX main UI thread to help display elements on the UI + * @author jane + * + */ +public class MapDisplay { + Pane root; + IDisplay roadDisplay, tracksDisplay; + Collection roads; + Collection track; + Collection gates; + + + public MapDisplay(Pane root, Collection roads, Collection tracks, Collection gates){ + this.root = root; + this.roads= roads; + this.track = tracks; + this.gates = gates; + roadDisplay = new RoadDisplay(roads,root); + tracksDisplay = new TracksDisplay(tracks,root); + } + + public void drawTracks(){ + tracksDisplay.draw(); + } + + public void drawRoad(){ + roadDisplay.draw(); + } + + public void drawGate(){ + for (CrossingGate gate: gates) + root.getChildren().add(gate.getGateLine()); + } + + + public void removeCarImages(ArrayList junkCars) { + for(Car car: junkCars) + root.getChildren().remove(car.getImageView()); + + } +} diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/view/RoadDisplay.java b/src/edu/nd/se2018/homework/hwk5/src/application/view/RoadDisplay.java new file mode 100644 index 00000000..6afb2eef --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/view/RoadDisplay.java @@ -0,0 +1,51 @@ +package application.view; + +import java.util.Collection; + +import application.model.infrastructure.Direction; +import application.model.infrastructure.Road; +import javafx.scene.layout.Pane; +import javafx.scene.paint.Color; +import javafx.scene.shape.Line; + + +/** + * Draws a road + * @author jane + * + */ +public class RoadDisplay implements IDisplay { + Pane root; + Collection roads; + int roadSize; + + + public RoadDisplay(Collection roads, Pane root){ + this.root = root; + this.roads = roads; + + } + + @Override + public void draw() { + for(Road road: roads){ + roadSize = road.getRoadWidth(); + if (road.getDirection() == Direction.NORTH || road.getDirection() == Direction.SOUTH) { + root.getChildren().add(new Line(road.getStartX()-roadSize,road.getStartY(),road.getEndX()-roadSize,road.getEndY())); + root.getChildren().add(new Line(road.getStartX()+roadSize,road.getStartY(),road.getEndX()+roadSize,road.getEndY())); + } else { + root.getChildren().add(new Line(road.getStartX(),road.getStartY()-roadSize,road.getEndX(),road.getEndY()-roadSize)); + root.getChildren().add(new Line(road.getStartX(),road.getStartY()+roadSize,road.getEndX(),road.getEndY()+roadSize)); + if (road.getClearEnds()){ + Line line = new Line(road.getStartX(),road.getStartY()-roadSize,road.getStartX(),road.getStartY()+roadSize); + line.setStroke(Color.WHITE); + root.getChildren().add(line); + Line line2 = new Line(road.getEndX(),road.getEndY()-roadSize,road.getEndX(),road.getEndY()+roadSize); + line2.setStroke(Color.WHITE); + root.getChildren().add(line2); + } + } + } + } +} + diff --git a/src/edu/nd/se2018/homework/hwk5/src/application/view/TracksDisplay.java b/src/edu/nd/se2018/homework/hwk5/src/application/view/TracksDisplay.java new file mode 100644 index 00000000..b241a14e --- /dev/null +++ b/src/edu/nd/se2018/homework/hwk5/src/application/view/TracksDisplay.java @@ -0,0 +1,35 @@ +package application.view; + +import java.util.Collection; + +import application.model.infrastructure.RailwayTracks; +import javafx.scene.layout.Pane; +import javafx.scene.shape.Line; + + +/** + * Draws a track + * @author jane + * + */ +public class TracksDisplay implements IDisplay { + Pane root; + Collection tracks; + int trackSize = 16; + + public TracksDisplay(Collection tracks, Pane root){ + this.root = root; + this.tracks = tracks; + } + + @Override + public void draw() { + for(RailwayTracks track: tracks){ + root.getChildren().add(new Line(track.getStartX(),track.getStartY()-trackSize,track.getEndX(),track.getEndY()-trackSize)); + root.getChildren().add(new Line(track.getStartX(),track.getStartY()+trackSize,track.getEndX(),track.getEndY()+trackSize)); + for(int j = track.getStartX()+(trackSize/2); j < track.getEndX(); j+=trackSize){ + root.getChildren().add(new Line(j,track.getStartY()-trackSize - 2,j,track.getEndY()+trackSize+2)); + } + } + } +} diff --git a/src/headfirst_design_patterns/ducks/.gitignore b/src/headfirst_design_patterns/ducks/.gitignore new file mode 100644 index 00000000..6ae8378f --- /dev/null +++ b/src/headfirst_design_patterns/ducks/.gitignore @@ -0,0 +1,2 @@ +/Pond.class +/Start.class diff --git a/src/headfirst_design_patterns/ducks/fly/.gitignore b/src/headfirst_design_patterns/ducks/fly/.gitignore new file mode 100644 index 00000000..1ff64775 --- /dev/null +++ b/src/headfirst_design_patterns/ducks/fly/.gitignore @@ -0,0 +1,3 @@ +/FlyBehavior.class +/FlyNoWay.class +/FlyWithWings.class diff --git a/src/headfirst_design_patterns/ducks/quack/.gitignore b/src/headfirst_design_patterns/ducks/quack/.gitignore new file mode 100644 index 00000000..c17b6343 --- /dev/null +++ b/src/headfirst_design_patterns/ducks/quack/.gitignore @@ -0,0 +1,4 @@ +/Mute.class +/Peep.class +/Quack.class +/QuackBehavior.class diff --git a/src/headfirst_design_patterns/ducks/types/.gitignore b/src/headfirst_design_patterns/ducks/types/.gitignore new file mode 100644 index 00000000..b6194058 --- /dev/null +++ b/src/headfirst_design_patterns/ducks/types/.gitignore @@ -0,0 +1,4 @@ +/Duck.class +/Mallard.class +/RedHeadDuck.class +/YellowDucky.class diff --git a/src/images/.DS_Store b/src/images/.DS_Store new file mode 100644 index 00000000..8560c5ef Binary files /dev/null and b/src/images/.DS_Store differ diff --git a/src/images/TrainReverse.png b/src/images/TrainReverse.png new file mode 100644 index 00000000..6239fe38 Binary files /dev/null and b/src/images/TrainReverse.png differ