This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
//1. create an array | |
var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
//2. initialize an empty array | |
var emptyArray = [Int]() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package objects; | |
import java.util.Arrays; | |
import java.util.Collections; | |
public class Quizbook { | |
String mQuestion; | |
boolean mAnswer; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.blogspot.skooltchdev.christchurchgirls; | |
import android.content.Context; | |
import android.graphics.Color; | |
import android.os.Bundle; | |
import android.support.v4.app.Fragment; | |
import android.support.v7.app.ActionBar; | |
import android.support.v7.app.AppCompatActivity; | |
import android.support.v7.widget.Toolbar; | |
import android.view.LayoutInflater; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<ripple | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:color="@color/colorAccent"> | |
<item> | |
<shape | |
android:shape="rectangle"> | |
<solid android:color="#4CAF50" /> | |
</shape> | |
</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Start of Button Listener for Button1 | |
mButtonChoice1.setOnClickListener(new View.OnClickListener(){ | |
@Override | |
public void onClick(View view){ | |
//My logic for Button goes in here | |
if (mButtonChoice1.getText() == mAnswer){ | |
mScore = mScore + 1; | |
updateScore(mScore); | |
Toast.makeText(QuizActivity.this, "correct", Toast.LENGTH_SHORT).show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.blogspot.skooltchdev.highlightcalendar; | |
import android.content.Context; | |
import android.graphics.Color; | |
import android.support.v7.app.ActionBar; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.Toast; | |
import com.github.sundeepk.compactcalendarview.CompactCalendarView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car { | |
public readonly int NumberOfWheels; //readonly keyword doesn't allow user to change the values | |
private readonly int NumberOfDoors | |
//Car Constructor Method which takes parameters of NumberOfWheels and NumberOfDoors | |
public Car(int NumberOfWheels, int NumberOfDoors){ | |
//Initializing the fields with method level variables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car { | |
} | |
//Creating an instance of the car class | |
// also called a Car instance or creating a car object | |
//Therefore an object is an instance of a class | |
//An instance is basically an object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main() { | |
System.Console.Write("What is your favourite animal?"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This is a comment. | |
//This class is about mammals. | |
class Mammals | |
{ | |
static void Main() | |
{ | |
} | |
} |