Skip to content

Commit

Permalink
initial commit - Adding all files at once
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinit-Kumar-Shah committed Jan 7, 2021
0 parents commit 197898a
Show file tree
Hide file tree
Showing 119 changed files with 174,243 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="lib/richtextfx-fat-0.6.10.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Empty file added .idea/.gitignore
Empty file.
6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MOOCTextEditor</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1601484476959</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
11 changes: 11 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -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
36 changes: 36 additions & 0 deletions MOOCTextEditor.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="EclipseModuleManager">
<libelement value="jar://$MODULE_DIR$/lib/richtextfx-fat-0.6.10.jar!/" />
<src_description expected_position="0">
<src_folder value="file://$MODULE_DIR$/src" expected_position="0" />
</src_description>
</component>
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/bin" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="jdk" jdkName="JavaSE-1.8" jdkType="JavaSDK" />
<orderEntry type="module-library">
<library name="junit4">
<CLASSES>
<root url="jar://$APPLICATION_HOME_DIR$/lib/junit-4.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="richtextfx-fat-0.6.10.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/richtextfx-fat-0.6.10.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
73 changes: 73 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/-------------------------------------------------------------------------
/ Starter Code and GUI Application for Course 2 in the
/ Java Programming: Object Oriented Design of
/ Data Structures Specialization:
/
/ Data structures: Measuring and Optimizing Performance
/ https://www.coursera.org/learn/data-structures-optimizing-performance
/
/ Authored by UCSD MOOC Team:
/ Mia Minnes, Christine Alvarado, Leo Porter, Alec Brickman
/ and Adam Setters
/
/ Date: 01/07/2021
/-------------------------------------------------------------------------

---------------------------------------------------------[ DESCRIPTION ]--

The files provided are skeleton code, as well as grading previews and
testing files to be used in completing the course programming
assignments. Additionally, you are provided a runnable JavaFX program
which will help to test and demonstrate your implementations.

-------------------------------------------------------[ FILES BY WEEK ]--

Below are the files introduced in each week and used in each week
of the course. See file for description...

Week 1 : Introduction and Working with Strings
==============================================
document.Document.java
document.BasicDocument.java

Week 2 : Efficiency Analysis and Benchmarking
=============================================
document.EfficientDocument.java

Week 3 : Interfaces, Linked Lists vs. Arrays, and Correctness
=============================================================
textgen.MyLinkedList*.java
textgen.MarkovTextGenerator.java
textgen.MarkovTextGenerator*.java

Week 4 : Trees! (including Binary Search Trees and Tries)
=========================================================
spelling.SpellingSuggest.java
spelling.AutoComplete.java
spelling.Dictionary.java
spelling.Dictionary*.java
spelling.AutoCompleteDictionaryTrie.java
spelling.TrieNode.java

Week 5 : Hash Maps and Edit Distance
====================================
spelling.WordPath.java
spelling.NearbyWords.java
spelling.WPTree.java

---------------------------------------------------------------[ SETUP ]--

Importing Project into eclipse:
1. Create a new Java Project in your workspace
2. Import the starter files:
File -> Import -> Select "File System" -> Next -> Browse and set
root directory to folder contents of zip were extracted to -> Finish

Feel free to use another IDE or manually compile and run your programs.
If you need help, google is your friend.

-----------------------------------------------------[ ACKNOWLEDGEMENTS]--

A big thank you to University of California San Diego for The guided project.


Binary file added bin/application/AutoSpellingTextArea.class
Binary file not shown.
Binary file not shown.
Binary file added bin/application/LaunchClass.class
Binary file not shown.
Binary file added bin/application/LoadFileDialogController.class
Binary file not shown.
Binary file added bin/application/MainApp.class
Binary file not shown.
Binary file added bin/application/MarkovController.class
Binary file not shown.
Binary file added bin/application/TextProController.class
Binary file not shown.
27 changes: 27 additions & 0 deletions bin/application/application.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@


.background{
-fx-background-color: #8fe2e9;
}



.myDialog{
-fx-background-color: #dbdcdd;
}
.myDialog > *.button-bar > *.container{
-fx-font-size: 14px;
-fx-background-color: #dbdcdd;
}
.myDialog > *.label.content{
-fx-font-size: 14px;
-fx-font-weight: bold;
}
.myDialog:header *.header-panel{
-fx-background-color: #061539;
}
.myDialog:header *.header-panel *.label{
-fx-font-size: 30 px;
-fx-font-style: italic;
-fx-text-fill: #FAFAFA;
}
45 changes: 45 additions & 0 deletions bin/application/view/EditDistanceLayout.fxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>

<VBox alignment="CENTER" fillWidth="true" prefHeight="200.0" prefWidth="300.0" spacing="10.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2" fx:controller="application.EditDistanceDialogController">
<children>
<Label text="Enter two words...">
<font>
<Font name="System Bold" size="16.0" />
</font>
<VBox.margin>
<Insets top="25.0" />
</VBox.margin>
</Label>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" spacing="15.0">
<children>
<Label text="Word 1 :">
<font>
<Font size="14.0" fx:id="x1" />
</font>
</Label>
<TextField fx:id="word1" prefHeight="25.0" prefWidth="155.0" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0" spacing="15.0">
<children>
<Label font="$x1" text="Word 2 :" />
<TextField fx:id="word2" prefHeight="25.0" prefWidth="155.0" />
</children>
</HBox>
<HBox alignment="BOTTOM_CENTER" prefHeight="100.0" prefWidth="200.0" spacing="35.0">
<children>
<Button font="$x1" mnemonicParsing="false" onAction="#handleCancel" text="Cancel" />
<Button fx:id="okButton" font="$x1" mnemonicParsing="false" onAction="#handleOk" prefWidth="65.0" text="OK" />
</children>
<VBox.margin>
<Insets bottom="25.0" />
</VBox.margin>
</HBox>
</children>
</VBox>
28 changes: 28 additions & 0 deletions bin/application/view/LoadFileLayout.fxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>

<VBox alignment="CENTER" prefHeight="200.0" prefWidth="300.0" minHeight ="35.0" spacing="25.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2" fx:controller="application.LoadFileDialogController">
<!-- TODO Add Nodes -->
<children>
<Label text="Choose text file..." />
<HBox alignment="CENTER" spacing="10.0">
<children>
<TextField fx:id="pathField" prefHeight="30.0" prefWidth="162.0" />
<Button mnemonicParsing="false" onAction="#handleBrowse" text="Browse" />
</children>
<padding>
<Insets />
</padding>
</HBox>
<HBox alignment="CENTER" spacing="30.0">
<children>
<Button mnemonicParsing="false" onAction="#handleAppend" text="Append" />
<Button mnemonicParsing="false" onAction="#handleReplace" text="Replace" />
</children>
</HBox>
</children>
</VBox>
52 changes: 52 additions & 0 deletions bin/application/view/MarkovLayout.fxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>

<BorderPane prefHeight="600.0" prefWidth="400.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2" fx:controller="application.MarkovController">
<!-- TODO Add Nodes -->
<bottom>
<VBox alignment="BOTTOM_CENTER" fillWidth="true" prefHeight="90.0" prefWidth="400.0" spacing="15.0">
<children>
<HBox alignment="CENTER" spacing="15.0">
<Label text="Number of words :">
<font>
<Font size="14.0" fx:id="x1" />
</font>
</Label>
<TextField fx:id="numWordsField" prefHeight="32.0" prefWidth="57.0" />
</HBox>
<Button font="$x1" mnemonicParsing="false" onAction="#handleGenerate" text="Generate Text!" />
</children>
<padding>
<Insets bottom="25.0" />
</padding>
<BorderPane.margin>
<Insets top="15.0" />
</BorderPane.margin>
</VBox>
</bottom>
<center>
<TextArea fx:id="resultBox" prefHeight="420.0" prefWidth="340.0" wrapText="true" />
</center>
<left>
<VBox prefHeight="450.0" prefWidth="30.0" />
</left>
<right>
<VBox prefHeight="450.0" prefWidth="30.0" />
</right>
<top>
<HBox alignment="CENTER" prefHeight="85.0" prefWidth="400.0">
<children>
<Label text="Markov Text" textAlignment="LEFT">
<font>
<Font size="40.0" />
</font>
</Label>
</children>
</HBox>
</top>
</BorderPane>
Loading

0 comments on commit 197898a

Please sign in to comment.