Code Monkey home page Code Monkey logo

javaexercises's Introduction

Usage:
=================
To build and runtests: gradle build
To run coberturage test coverage: gradle cobertura
To view reports: open build/reports/cobertura/index.html

Problem Statement:
=================

Do all of the problems in Java and push your results into GitHub. Test Drive your solution to the best of your ability and write the most readable code you can.

When you finish the exercises let me know which one you found the most challenging and how you would rate it on a scale from 1(Trivial) to 5 (Super Tough).

If you get stuck, ask for help from someone else who is doing this homework, your teammates, or email me.

Here are the problems:

Given a number n, print a centered diamond. It should look something like this:
  *
 ***
*****
 ***
  *
(Rating: 1.5)

Given a number n, print the sum of all of the numbers from 1 to n.
(Rating: 1)

Given a number n, print the average of all of the numbers from 1 to n.
(Rating: 1)

Compute an approximation of pi using this formula: (see ExerciseBasics_ComputePI.png)
(Rating: 2)

Given an array of Integers, print out all of the odd ones.
(Rating: 1)

Given an array of Integers, print the sum of the odd ones and the product of the even ones.
(Rating: 2 - the extra point is for the difficulty of sensible reuse)


This is taken from Programming Pearls (don't look it up yet because it talks about solutions).
Write a program that uses text content from a file to build an Order 1 Word Markov Chain and then generate a block of text with as many words as the source text contains. Generalize this code for Order 2 Chains.
Markov Chain Text Generation
How can you generate random text? A classic approach is to let loose that poor monkey on his aging typewriter. If the beast is equally likely to hit any lower case letter or the space bar, the output might look like this:
(excerpt of problem goes here)

javaexercises's People

Contributors

compwron avatar

Watchers

James Cloos avatar  avatar

Forkers

mweems

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.