Giter Site home page Giter Site logo

Hi My name is Morgan Hill

Developer

Sure! Here's a more laid-back version: I'm an engineer with a Computer Science degree and five years in the field. I love creating reliable, scalable apps and have led some cool projects. I'm into full-stack development, test automation, and project management. Always up for learning and growing with each new challenge!

  • 🌍  I'm based in Provo, UT
  • ✉️  You can contact me at [email protected]
  • 🧠  I'm learning more React!
  • 🤝  I'm open to collaborating on anything I can learn from!

Skills

CC++C#GitJavaJavaScriptPythonSwiftGNU BashVS CodeXCodeHTML5ReactJQueryCSS3SassBootstrapReduxNodeJSMySQLPostgreSQLHerokuWordpressSquarespaceWixFlutterAmazon Web ServicesArduinoLinuxMacOSRaspberry Pi

Socials

Top Languages

Morgan Hill's Projects

1410-assignment-2 icon 1410-assignment-2

The project contains a class called MethodLibrary. It contains method stubs for the methods you are to implement, plus an empty main method that you can use as you see fit. The method stubs are precisely specified in their Javadoc comments. Your job is to implement the methods so that they adhere to their specifications. These methods will exercise much of what you've learned about Java. You will be using primitive values (ints, doubles, booleans, and chars) and objects (Strings, Scanners, and BigIntegers). You'll be using lots of different kinds of expressions, including static method calls, object creation, and method calls on objects. None of these methods require the use of conditionals, loops, or recursion. Even if you are familiar with any of those techniques, implement the methods without using them. To help you out in this task, I have also given you a class called TestCases, which contains a set of JUnit test cases. (JUnit is a tool built into Eclipse that makes it easy to manage and run test cases.) You can run these test cases at any time to assess your progress. (To run them, open up TestCases.java and run like usual. Several panes will open up showing you the result of the tests. It is not difficult to interpret the results.) If you run the test cases immediately after importing the project, your code will fail all the tests. If you run them immediately before handing in your solution, your code will hopefully pass all the tests. That should be your goal, anyway. Be sure to add your name as the author to the Javadoc comment associated with the class. Notice how I have chosen descriptive names, wherever possible, for all classes, methods, and variables. If you want full credit, you should do the same. Notice how my code is nicely formatted. Your code should be nicely formatted too. (If you type Control-Shift-F Eclipse will format your code for you.) Before beginning, make sure that you understand all of the examples from the lectures of last week.

1410-assignment-3 icon 1410-assignment-3

The project contains a class called MethodLibrary. It contains method stubs for the ten methods you are to implement, the complete implementation of a helper method you WILL find useful, and an empty main method that you can use as you see fit. The ten method stubs are precisely specified in their Javadoc comments. Your job is to implement the ten methods so that they adhere to their specifications. These ten methods all involve using conditionals or loops. To help you out in this task, I have also given you a class called TestCases, which contains a set of JUnit test cases. (JUnit is a tool built into Eclipse that makes it easy to manage and run test cases.) You can run these test cases at any time to assess your progress. (To run them, open up TestCases.java and run like usual. Several panes will open up showing you the result of the tests. It is not difficult to interpret the results.) If you run the test cases immediately after importing the project, your code will fail all ten tests. If you run them immediately before handing in your solution, your code will hopefully pass all ten tests. That should be your goal, anyway. Be sure to add your name as the author to the Javadoc comment associated with the class. Notice how I have chosen descriptive names, wherever possible, for all classes, methods, and variables. If you want full credit, you should do the same. Notice how my code is nicely formatted. Your code should be nicely formatted too. (If you type Control-Shift-F Eclipse will format your code for you.)

1410-assignment-4 icon 1410-assignment-4

Loops Your job is to create a class called Loops in package loops. That class should contain implementations of the following five public, static methods. The class and each method must have a Javadoc comment that explains what they do. Your comments should describe behavior from the point of view of an external observer. The best way to do this is to write the comments before you write the code. containsToken takes a String s and a String t as parameters, and returns a boolean. It returns true if t occurs as a token within s, and returns false otherwise. (Implementation note: Use a Scanner to break s into tokens, and use a searching loop to look for t.) findLineWithToken takes a Scanner scn and a String t as parameters, and returns a String. It returns a line from scn that contains t as a token (if such a line exists) and returns the empty string (otherwise). (Implementation note: You'll find the containsToken method specified above helpful. This method calls for a searching loop.) isPalindrome takes a String s as a parameter and returns a boolean. It returns true if s reads the same forwards and backwards, and returns false otherwise. You are not allowed to use any method that reverses s. (Implementation note: Use a loop that searches for a character in s that doesn't "match up" with an identical character elsewhere in the string. You'll need to determine the appropriate definition of "match up".) findLongestPalindrome takes a Scanner scn as its parameter and returns a String. It returns the longest token from scn that is a palindrome (if one exists) or the empty string (otherwise). (Implementation note: You'll find the isPalindrome method helpful here. This method calls for an optimization loop.) findMostWhitespace takes a Scanner scn as its parameter and returns an int. It finds the line in scn with the most whitespace characters and returns the number of whitespace characters it contains (if scn contains at least one line) or -1 (otherwise). (Implementation note: This method calls for an optimization loop, and will be be easy if you first implement a method that counts the amount of whitespace in a string. There is a method Character.isWhitespace() that you'll find useful.) Fall 2018 Home Syllabus Modules Assignments Grades Files Gradescope My Media Office 365 PS4 Due Sep 23, 2018 by 11:59pm Points 100 Submitting a file upload File Types zip Use the CPM to create a new project for PS4. You should end up with a Java project with a name of the form PS4_LASTNAME_FIRSTNAME. Alternatively, you can download PS4_Starting_Point.zip, import it into Eclipse, and rename the imported project. This assignment has two parts, Loops and Animation. Be sure to complete both of them! Loops Your job is to create a class called Loops in package loops. That class should contain implementations of the following five public, static methods. The class and each method must have a Javadoc comment that explains what they do. Your comments should describe behavior from the point of view of an external observer. The best way to do this is to write the comments before you write the code. containsToken takes a String s and a String t as parameters, and returns a boolean. It returns true if t occurs as a token within s, and returns false otherwise. (Implementation note: Use a Scanner to break s into tokens, and use a searching loop to look for t.) findLineWithToken takes a Scanner scn and a String t as parameters, and returns a String. It returns a line from scn that contains t as a token (if such a line exists) and returns the empty string (otherwise). (Implementation note: You'll find the containsToken method specified above helpful. This method calls for a searching loop.) isPalindrome takes a String s as a parameter and returns a boolean. It returns true if s reads the same forwards and backwards, and returns false otherwise. You are not allowed to use any method that reverses s. (Implementation note: Use a loop that searches for a character in s that doesn't "match up" with an identical character elsewhere in the string. You'll need to determine the appropriate definition of "match up".) findLongestPalindrome takes a Scanner scn as its parameter and returns a String. It returns the longest token from scn that is a palindrome (if one exists) or the empty string (otherwise). (Implementation note: You'll find the isPalindrome method helpful here. This method calls for an optimization loop.) findMostWhitespace takes a Scanner scn as its parameter and returns an int. It finds the line in scn with the most whitespace characters and returns the number of whitespace characters it contains (if scn contains at least one line) or -1 (otherwise). (Implementation note: This method calls for an optimization loop, and will be be easy if you first implement a method that counts the amount of whitespace in a string. There is a method Character.isWhitespace() that you'll find useful.) As a starting point, I have provided you with a unit test class called LoopTests. Until you create your Loops class it will, of course, contain lots of compiler errors. I strongly suggest that you following these steps when you implement Loops. Start early First, create stubs for each of the methods. Each method is public and static. I have told you what to call each method, what parameters each method takes, and what type of value each method returns. Each stub should have a Javadoc comment, a method header, and a body consisting of a single return statement. The idea is to get enough information into the class so that neither Loops nor LoopTests has any compiler errors. Now implement the methods, one after the other. Pay attention to the implementation notes I've given above. As you work on each implementation, use the test cases frequently to gauge your progress. Start early Animation In your PS4 project, run the AnimationWindow class, which you find inside of the animation package. Click the Play button and you will see a barrage of cannon balls. Your job is to create an animation that is as interesting as mine (which isn't saying much). At a minimum, I want an animation that: Is different from mine. (Don't simply take my code and make minor changes. Create something different.) Tells a story to us, amuses us, or impresses us. (Mine is mildly amusing.) Uses at least two different shapes that move. (I only have one such shape.) Lasts at least ten seconds. Interesting things should happen throughout the animation. (Mine does pretty well here.) Has multiple independent objects moving in different directions simultaneously. (Mine does this briefly.) Has multiple independent objects that change direction without first jumping. (Mine do this continuously.) Has multiple independent objects that change color. (Mine doesn't do this.) Has an object that smoothly expands or shrinks. (Mine doesn't do this.) The best animations will be featured in the CS 1410 Animation Festival, coming later this semester. We will only look at the first fifteen seconds when grading. You can make the animation longer if you like, but be sure that all of the required elements appear in the first fifteen seconds.

1410-assignment-5 icon 1410-assignment-5

My generateText method depends on four public static methods that are currently missing from PS5Library. Your first job is to implement and test them. They are: scannerToString, which takes a Scanner as its parameter and returns a String. The returned string consists of all the characters in the scanner in their original order, including the newlines. The last line (assuming there are any lines) should always end with a newline, even if it didn't in the original text. For example, scannerToString("This\nis a\ntest") should return "This\nis a\ntest\n". A convenient way to implement this method is to build up the result by reading one line at a time from the Scanner. For much improved efficiency when dealing with Scanners containing complete books, consider using a StringBuilder object to construct the result. You can look at my generateText method for an example of its use. chooseSubstring, which takes a String text, an int length, and a random number generator as its parameters. It should use the random number generator to return a randomly chosen substring of text that has the specified length. If length is either negative or greater than the length of text, the method should throw an IllegalArgumentException. For example, chooseSubstring("abcde", 4, new Random()) should return "abcd" about half the time and "bcde" about half the time. A string of length n will contain n+1-m different substrings of length m, assuming n ≥ m. These substrings start at indexes ranging from 0 to n-m. There is a convenient method provided by the Random parameter that you can use to choose a random index. getCharsThatFollowPattern, which takes a String text and a String pattern as parameters, and returns an ArrayList<Character>. The returned list should contain the character that follows each non-tail occurrence of the pattern in the text. (A non-tail occurrence of the pattern is one that is not at the very end of the text.) The length of the list must be the same as the number of non-tail occurrences of the pattern. The character stored at index n of the list must be the character that followed the nth non-tail occurrence of the pattern. For example, getCharsThatFollowPattern("abcabdabcab", "ab") should return the ArrayList ['c', 'd', 'c']. To implement this method, use the two-parameter indexOf method provided by String objects. It will help you to find efficiently all occurrences of the pattern. If you find yourself examining every character of the string and using the substring method, you're going about it wrong. pickCharThatFollowsPattern, which takes a String text, a String pattern, and a random number generator as parameters. It should randomly choose a non-tail occurrence of the pattern in the text, returning the character that immediately follows that occurrence of the pattern. If there are no non-tail occurrences of the pattern in the text, the method should throw a NoSuchElementException. For example, pickCharThatFollowsPattern("They are here", "he") should return 'y' or 'r' with equal probability. You should use your getCharsThatFollowPattern method in your implementation of this method. If you don't, you'll be wasting a lot of time. You are to implement these four methods so that they behave exactly as specified. When you do this, you will pass the four tests contained in PS5LibraryTests and my generateText method will work as specified. Do not deviate from the specifications; do not modify generateText; do not modify the four tests. In addition to implementing the four methods, you are to add additional test methods to PS5LibraryTests. The tests that it currently contains are only a starting point. You goal should be to thoroughly exercise all aspects of each method's specification, including the cases where exceptions are thrown. You will benefit from adding these test cases in two ways. First, part of your grade will be based on the test cases that you add. Second, by thoroughly testing your methods, you are more likely to pass the test cases that we will use when we grade. Part 2 When you are confident that your methods work properly and that you can generate random text with my generateText method, you can move on to the second step. Create a third class called Generator within the cs1410 package. This class should have a main method that provides a user interface for random text generation. Your interface should work as follows: It should bring up an input dialog with which the user can enter the desired analysis level . The user should be repeatedly prompted until he or she enters an integer zero or higher. If the user cancels the dialog, the program should end. It should bring up an input dialog with which the user can enter the desired length of the output text. The user should be repeatedly prompted until he or she enters an integer zero or higher. If the user cancels the dialog, the program should end. It should bring up a file dialog with which the user can select a text file to be analyzed. The user should be repeatedly prompted until he or she selects a file that can be opened. If the user cancels the dialog at any point, the program should end. If the text file turns out to contain fewer than level+1 characters, an appropriate error message should be displayed and then the program should end. It should use the generateText method and the three inputs provided by the user to generate random text. It should use a message dialog to display the generated text. The program should then end. Your program should handle gracefully all user errors. Under no circumstances should the program crash because of an unhandled exception.

1410-assignment-6 icon 1410-assignment-6

You are to implement the three methods that are specified in the GraphingMethods class. You may not modify and do not need to understand either Main.java or GraphWindow.java, and you must implement the three methods in GraphicsMethods exactly as specified. Read their specifications carefully, because they are very detailed. The three methods have simple skeleton implementations that, while incorrect, allow the application to run. When you have correctly implemented the methods, the project as a whole will also work properly. You are also to create a JUnit test class called "MyTestCases" in the cs1410 package. For each method that you implement---whenever it is one of my methods or one of your helpers---you are to create JUnit test cases that test it thoroughly. The only exception is for methods that draw with a Graphics object, as there is no easy way to make assertions about such methods. I have provided a test class called SampleTestCase that contains a single, completely inadequate test class that can serve as an inspiration. The purpose of this assignment is to give you practice with the collection classes as well as with procedural design. The methods are complicated enough that you are going to almost certainly want to design and implement helper methods. Here's how you should proceed: Create a thorough set of JUnit test cases for the readTable and prepareGraph methods. Be sure to have tests for all situations when an exception may be thrown, as well as several tests for the non-exceptional situations. Do this before you begin implementing either method. There are two benefits to writing tests before beginning implementation. First, writing the test cases will help you understand what the methods are supposed to do. Second, you will be able to use the test cases when you begin the implementation. Neither me nor the TAs will answer questions about your method implementations unless you can show us a complete set of test cases for that method. Sit and think about how you will go about implementing the three methods. Work through examples on paper. When you identify helper methods that would make your life easier, create stubs and test cases for them. Once you have a good design, implement the methods, beginning with the helpers. Use the test cases to gauge your progress. (If you're like me, you'll probably discover problems in the test cases as you go.) Your three methods will be graded based on how closely they implement their specifications, how well they are designed, how well they are written, and how well they are tested. Don't conclude that your methods are implemented correctly merely because the overall application works properly. Pay attention to the specifications!

1410-assignment-7 icon 1410-assignment-7

Geocaches For the purposes of this assignment you do not need to know what geocaches are, but it can't hurt. Geocaches are containers of various sizes that are hidden throughout the world. Geocachers (such as me) are people who enjoy looking for geocaches. There is a free geocaching app available for smart phones. There is also a website, https://www.geocaching.com/play/search, (Links to an external site.)Links to an external site. that we use to learn about geocaches in our area. For example, there are more than 200 geocaches within two miles of MEB. Every geocache at geocaching.com has (among other things) a title, an owner, the GPS coordinates where it is located, a difficulty rating that describes how difficult the geocache is to find, and a terrain rating that describes how hard it is to travel to the hiding place. My geocaching name is "lesdubois", and I specialize in hiding "puzzle" caches. To get the GPS coordinates of a puzzle cache, you have to first solve a puzzle. To solve one of my puzzles, Digital Dilemma 2 (Links to an external site.)Links to an external site., the geocacher needs to write some simple computer programs. If you're interested, the programs required are the right difficulty for CS 1410 students. But I digress. Getting Started You will be completing the implementation of a program that I have started. Your job will be to provide correct implementations and unit tests for two classes: Cache and CacheList. Begin by running PS7Demo.jar. Use the file chooser that pops up to navigate to and open the file caches.txt, which contains a list of geocaches. (The list is a few years old, so some of the geocaches it contains no longer exist.) The program will then open an application that lets you search through the contents of caches.txt. When you have completed this assignment, your program should behave just like the demo program you have just run. The four source files define five classes: Cache, CacheList, GeocacheBrowser, CacheTests, and CacheListTests. You should not modify GeocacheBrowser. Unless you are curious, you do not need to understand it or even look at it. GeocacheBrowser contains a main method. Run it, and it will bring up the same application as the jar file. Most everything will be blank, however, until you complete Cache and CacheList. The application uses Cache objects (implemented by your Cache class) to represent individual geocaches. It uses a CacheList object (implemented by your CacheList class) to keep track of, filter, and sort all the Cache objects. Please read and follow the directions carefully. Cache Class The Cache class provides objects that represent information about a single geocache. The class file contains complete specifications as well as a completed implementation for the toString method. You should Read carefully through the entire class file. Create a complete set of unit tests for the Cache class. I have created a test class called CacheTests that contains a sample test. You should add your tests to this class. The TAs and I will not help you with your Cache class implementation until you have completed this step! The key to testing class implementations is to realize that it is not usually possible to test each constructor and method in isolation. For example, to test the getOwner() method of the Cache class, you must first use the constructor to create a Cache object. Design a representation and then declare and document your instance variables. Implement the constructor. Each line of the file caches.txt is an example of a string that the constructor should be able to take as a parameter. (Hint: Use the String split method.) Implement the methods (other than toString, which is already complete). Test/debug/modify your Cache and CacheTests classes until you are certain that the Cache class behaves according to its specifications. CacheList Class The CacheList class provides objects that represent collections of Caches as well as constraints on them. The class file contains complete specifications as well as a partial implementation. You should Read carefully through the entire class file. Create a complete set of unit tests for for the CacheList class. I have created a test class called CacheListTests that contains a sample test. You should add your tests to this class. The TAs and I will not help you with your CacheList class implementation until you have completed this step! Keep in mind that it is not usually possible to test each constructor and method in isolation. For example, to test the setTitleConstraint() method of the CacheList class, you must use the constructor to create a CacheList object, use setTitleConstraint(), and then call the select() method to see if the title constraint has the proper effect. Design a representation and then declare and document your instance variables. Please note that I have already provided a key part of the representation. Complete the implementation of the constructor. The file caches.txt is an example of the kind of file that the constructor should be able to process. Please note that I have included code that shows how to sort a list of Cache objects. Implement the methods. Please note that the partial implementation of getOwners I have provided shows how to sort a list of Strings. Test/debug/modify your CacheList and CacheListTests classes until you are certain that the CacheList class behaves according to its specifications. GeocacheBrowser If you have correctly implemented Cache and CacheList, your GeocacheBrowser should behave identically to the example implementation. If it doesn't, the problem is with either Cache or CacheList. Part 2 MyScanner In this part of the problem set, you are to design, implement, document, and test a class that provides objects that have a subset of the capabilities of Scanners. Your class must: Be called MyScanner and be in a package called scan Provide a constructor that takes a String as a parameter Provide four methods: hasNext(), which takes no parameters and returns a boolean next(), which takes no parameters and returns a String hasNextInt(), which takes no parameters and returns a boolean nextInt(), which takes no parameters and returns an int Not use Scanner in its implementation! A MyScanner should behave just like a Scanner would if you only used the Scanner's String constructor and its hasNext(), next(), hasNextInt(), and nextInt() methods. Be sure that you understand exactly how Scanners behave, including the circumstances in which exceptions are thrown. Don't simply assume you know how those methods interact. For example, hasNextInt() doesn't report whether there is an integer token somewhere in the Scanner; it reports whether the next token can be parsed as an int by Integer.parseInt(). You should read the relevant parts of the Scanner documentation (Links to an external site.)Links to an external site. and (probably more importantly) experiment with Scanners. Since there is no close() method, none of the MyScanner methods should ever throw an IllegalStateException. However, in the right circumstances some of the MyScanner methods should throw a java.util.NoSuchElement exception and/or a java.util.InputMismatchException. Be sure to test your MyScanner class thoroughly. Put your unit tests in a class MyScannerTests in the scan package. If I were you, I would write thorough test cases for the Scanner class. Then, when I was sure that my tests cases were correct and complete, I would do a global replace of "MyScanner" for "Scanner". But that's just me. Hint: Here is a bit of code that decomposes a string into an array of tokens: String[] tokens = s.trim().split("\\s+"); Here's how it works. It first "trims" the string, which removes all leading and trailing white space. It then splits the string into tokens. The parameter that is passed to split says that tokens will be separated by one or more white space characters.

1410-first-assignment icon 1410-first-assignment

Use Eclipse to add a class called GasMileage in package cs1410. Don't call the class gasmileage or Gas_Mileage or GasolineMileage or PS1 or MyFirstJavaClass. Call it GasMileage. We're picky about the package name too. Your GasMileage class must contain a main method. (You can look at the Java projects from the first two lectures---get them into Eclipse with the CPM plugin---for examples of main methods.) You should assume that your program will be used only by car owners who fill the tank completely each time they buy gas. Your program should: Use a succession of popup dialog boxes to ask your user for: A type of car (a String) The number of miles driven since the last time gas was purchased, (an int) The price in dollars of a gallon of gasoline (a double) The number of gallons currently required to fill the car's tank (a double) Your program should report, in a single popup dialog, a summary giving the type of car, the total cost of the gas that would be required to fill the tank, the number of miles per gallon that were attained since the previous fillup, and the gasoline cost per mile since the previous fill-up. The first line of output is the type of car, exactly as entered by the user. The second line is the product of the price of gas and the number of gallons . The third line is the quotient of the number of miles driven and the number of gallons. The fourth line is the quotient of the gas cost (from the second line of output) and the number of miles driven. Your program should also display, in the Eclipse console window, exactly the same summary that was reported in the popup. To keep things simple, your program does not need to deal with user input errors (such as entering something other than a number as the cost of gas).

cs-3100-lab1 icon cs-3100-lab1

Lab 1 from CS 3100 - Operating Systems at Weber State University with Ted Cowan

cs-3100-lab2 icon cs-3100-lab2

Lab 2 from CS 3100 - Operating Systems at Weber State University with Ted Cowan

cs-3100-lab3 icon cs-3100-lab3

Lab 3 from CS 3100 - Operating Systems at Weber State University with Ted Cowan

cs-3100-lab4 icon cs-3100-lab4

Lab 4 from CS 3100 - Operating Systems at Weber State University with Ted Cowan

cs-3100-lab5 icon cs-3100-lab5

Lab 5 from CS 3100 - Operating Systems at Weber State University with Ted Cowan

cs-3100-lab6 icon cs-3100-lab6

Lab 6 from CS 3100 - Operating Systems at Weber State University with Ted Cowan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.