Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions IMC_DataScience/IMC_OOPTutorial/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# TEMPLATE

## :fire: Do not edit this file - copy the template and create your own file.

**[Step-By-Step Technical Blog Guide](https://hq.bitproject.org/how-to-write-a-technical-blog/)**

### :pushpin: Step 1
**TITLE:**
Coding for (Not Quite) Dummies: Object Oriented Design

**TOPIC:**
Object Oriented Design

**DESCRIPTION (5-7+ sentences):**
This presentation is intended to help prospective students learn higher-level concepts related to Computer Science, and bridge the gap from "Khan Academy" to "Computer Scientist." Specifically, this presentation will focus on Object Oriented Design and teaching students the basic concepts and implementations of it in Java. They will learn about constructors, fields and methods, and inheritance, among other things.

### :pushpin: Step 2
:family: **TARGET AUDIENCE (3-5+ sentences):**
The target audience is students who know the basics of Java but not much beyond that. The course will assume the learners are familiar with syntax and basic functions (there are a variety of resources available for people to learn that) and build upon that knowledge.

### :pushpin: Step 3
> Outline your learning/teaching structure:

**Beginning (2-3+ sentences):**
Comment thread
michaelloughnane marked this conversation as resolved.
A basic overview of the goals of this presentation, and the expected prerequisites. Also, a high level introduction to object oriented programming (no code! This isn't mean to scare them off!)

**Middle (2-3+ sentences):**
The meat and potatoes of the presentation. Showing the basic features of the concept, alongside sample code to demonstrate those features in action. Also, will have a project for learners to code on their own to ensure comprehension - the sample code given will be helpful to this end, but it won't just be a case of "copy down the code and you're done"

**End (2-3+ sentences):**
Give the solution to the sample code made in the prior section, alongside expanations in case any confusion arises. (The beginning bits of the code may be given earlier to make sure nobody's completely lost). Discuss where to go after this, and potentially lead into another lesson.
47 changes: 47 additions & 0 deletions IMC_DataScience/IMC_OOPTutorial/solution/Person.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
public class Person
{
//Coding this will be an exercise for the students participating in the lesson; incomplete code fragments will be used to initially demonstrate the concepts.
//As this is a simple program, there isn't any comments within the body - the method and variable names are intended to be self-explanatory.

private String firstName;
private String lastName;
private int age;

public Person(String theirFirstName, String theirLastName, int theirAge)
{
firstName = theirFirstName;
lastName = theirLastName;
age = theirAge;
Comment thread
michaelloughnane marked this conversation as resolved.
}

public int getAge()
{
return age;
}

public String getFirstName()
{
return firstName;
}

public String getLastName()
{
return lastName;
}

public String getName()
{
String fullName = firstName + " " + lastName;
return fullName;
}

public void increaseAge()
{
age++;
}

public void increaseAge(int ageIncrement)
{
age += ageIncrement;
}
}
20 changes: 20 additions & 0 deletions IMC_DataScience/IMC_OOPTutorial/starter/PersonTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

public class PersonTest
{
//A simple test file for Person.java.

public static void main(String[] args)
{
Person John = new Person("John", "Smith", 26);
System.out.println(John.getFirstName());
System.out.println(John.getLastName());
System.out.println(John.getName());
System.out.println(John.getAge());

John.increaseAge();
System.out.println(John.getAge());

John.increaseAge(3);
System.out.println(John.getAge());
}
}