Giter Site home page Giter Site logo

sshahryar / java-programming-i_mooc.fi Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 43 KB

Repository where I will be uploading my submissions for exercises from the "Java Programming I" course from the University of Helsinki.

License: MIT License

Java 100.00%
java mooc-fi-java

java-programming-i_mooc.fi's Introduction

JavaProgrammingI_mooc.fi

Repository where I will be uploading my submissions for exercise solutions from the "Java Programming I" course from the University of Helsinki.

The exercise solutions were submitted using the TMC (test my code) plugin from the Univerity of Helsinki using IntelliJ Idea, the submissions stored here are for keepsake, personal achievement and public access to my course completion.

The exercise submissions are placed in a folder based on the part of the course they were from.

For example, the exercise solution submissions for part 1 will be in the "Part1ExerciseSubmissions" folder, below will be the parts of the courses with their exercises and solution submissions all in order.

Details about the readings, quizzes and other components of the course will be in the wiki.

The Exercises

Part1ExerciseSumbissions

1. Sandbox.java

Submission:

public class Sandbox {

public static void main(String[] args) {
    // Write your program here
    }
}

Purpose:

The purpose of this program was to simply submit something through the TMC (Test My Code) plugin from the University of Helsinki, to get familiarized with it.

Output:

Nothing. Simply a submission exercise.

2. AdaLovelace.java

Submission:

public class AdaLovelace {

public static void main(String[] args) {
    // Write your program here
    System.out.println("Ada Lovelace");
    }
}

Purpose:

Simple console based output.

Output:

image

3. OnceUponaTime.java

Submission:

public class OnceUponATime {

public static void main(String[] args) {
    // Write your program here
    System.out.println("Once upon a time");
    System.out.println("there was ");
    System.out.println("a program");
    }
}

Purpose:

Printing more than one line.

Output:

image

4. Dinosaur.java

Submission:

public class Dinosaur {

public static void main(String[] args) {
    // Write your program here
    System.out.println("Once upon a time");
    System.out.println("there was");
    System.out.println("a dinosaur");
    }
}

Purpose:

Using the 'sout' command to quickly write printing lines.

Output:

image

5. Message.java

Submission:

import java.util.Scanner;

public class Message {

public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    System.out.println("Write a message:");
    String message = scanner.nextLine();

    System.out.println(message); 
    }
}

Purpose:

Getting a string from the user.

Output:

image

6. HiAdaLovelace.java

Submission:

public class HiAdaLovelace {

public static void main(String[] args) {
    String name = "Ada Lovelace!";
    System.out.println("Hi " + name);
    }
}

Purpose:

Using strings with a text output.

Output:

image

7. MessageThreeTimes.java

Submission:

import java.util.Scanner;

public class MessageThreeTimes {

public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    System.out.println("Write a message:");
    String message = scanner.nextLine();

    System.out.println(message);
    System.out.println(message);
    System.out.println(message);
    }
}

Purpose:

Printing a user inputed string three times in a row.

Output:

image

8. Greeting.java

Submission:

import java.util.Scanner;

public class Greeting {

public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    System.out.println("What's your name?");
    String message = scanner.nextLine();

    System.out.println("Hi " + message);
    }
}

Purpose:

Greeting a user after they input their name using strings.

Output:

image

9. Coversation.java

Sumbission:

import java.util.Scanner;

public class Conversation {

public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    System.out.println("Greetings! How are you doing?");
    String doing = scanner.nextLine();

    System.out.println("Oh, how interesting. Tell me more!");
    String more = scanner.nextLine();

    System.out.println("Thanks for sharing!");

     }
}

Purpose:

Using user string inputs to form a little conversation.

Output:

image

10. Story.java

Submission:

import java.util.Scanner;

public class Story {

public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    System.out.println("I will tell you a story, but I need some information first.");

    System.out.println("What is the main character called?");
    String name = scanner.nextLine();

    System.out.println("What is their job?");
    String job = scanner.nextLine();

    System.out.println("Here is the story:");
    System.out.println("Once upon a time there was " + name + ", who was " + job + ".");
    System.out.println("On the way to work, " + name + " reflected on life.");
    System.out.println("Perhaps " + name + " will not be " + job + " forever.");
  }
}

Purpose:

Forming complicated text based on user input.

Output:

image

java-programming-i_mooc.fi's People

Contributors

sshahryar avatar

Stargazers

 avatar

Watchers

 avatar

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.