Skip to content

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

License

Notifications You must be signed in to change notification settings

Sshahryar/Java-Programming-I_mooc.fi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages