Journey to Java: Episode 6 “Intro to Object-Oriented Programming”

public class Car {}
public class Car {
private String make;
private String model;
private String color;
}
public class Main {
public static void main(String[] args){
Car ford; = new Car();
Car chevy; = new Car();
}}
public class Car {
private String make;
private String model;
private String color;
public void setMake(String make) {
this.make = make;
}}
public class Main {
public static void main(String[] args){
Car ford; = new Car();
Car chevy; = new Car();
ford.setMake("Ford");}}
public class Main {
public static void main(String[] args){
Car ford; = new Car();
Car chevy; = new Car();
ford.setMake("Ford");
ford.setModel("Mustang");
ford.setColor("Silver");
}}public class Car {
private String make;
private String model;
private String color;
public void setMake(String make) {
this.make = make;
}
public void setModel(String model) {
this.model = model;
}
public void setColor(String color) {
this.color = color;
}
}
public class Car {
private String make;
private String model;
private String color;
public void setMake(String make) {
this.make = make;
}
public void setModel(String model) {
this.model = model;
}
public void setColor(String color) {
this.color = color;
}
Public String getMake() {
return this.make
}
}
public class Main {
public static void main(String[] args){
Car ford; = new Car();
Car chevy; = new Car();
ford.setMake("Ford");
ford.setModel("Mustang");
ford.setColor("Silver");

System.out.println("make is " + ford.getMake());
}}

--

--

--

Student at The Flatiron School in Washington DC

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

OmiseGO: 2018 in review, Plasma and eWallet updates, Chart comparing different plasma designs

Repository Design Pattern

Listing of Items in Flutter

Advent of Christmas 2 | 2020 Walkthrough

Development Cycle — Branching, Merging, and releasing

ARRAYS AND STRINGS DATA STRUCTURES.

Day 100: Segmented Eratosthenes sieve

Detailed Guide on Transferring Files from Dropbox to Google Drive

Dropbox to Google Drive Migration

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam Adolfo

Adam Adolfo

Student at The Flatiron School in Washington DC

More from Medium

SAP NetWeaver Java System Rename on Windows — Part 1

Top Interview questions of Sql

Exception Handling:

Dlithe Bootcamp .NET Full Stack Developer- Week 3