Skip to content

Instantly share code, notes, and snippets.

Mora mlabisi

Block or report user

Report or block mlabisi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Card.java
// THIS CLASS CREATES A CARD OF A GIVEN RANK AND SUIT
package classes;
public class Card {
// class methods
private final int suit;
private final int rank;
// suit initializations
public final static int DIAMONDS = 1;
public final static int CLUBS = 2;
View Main.java
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
ArrayList<Student> students = new ArrayList<Student>();
while (true) {
View KeyCreator.java
import java.util.Random;
import java.util.ArrayList;
public class KeyCreator {
// Define the variables
private Random random = new Random();
private int passwordLength;
View LotteryNumbers.java
import java.util.ArrayList;
import java.util.Random;
public class LotteryNumbers {
private ArrayList<Integer> numbers;
private Random random = new Random();
public LotteryNumbers() {
View ex36.rb
module Welcome
puts "Welcome to the Ultimate Harmonizer Adventure: Backstage Edition!"
puts "Press [ENTER] to begin!"
$stdin.gets.chomp
puts "\nREMEMBER: Press [ENTER] when you see '...' and type in your answer when you see '>'."
puts "Have fun!!!"
puts "..."
View madlibs.rb
def answers(one, two, three, four, five)
puts "I once #{one} a snake. It was lots of fun."
puts "It's hard to go water skiing when you don't have #{two}!"
puts "The longest time she's gone without showering is #{three} days..."
puts "Ever since I was young, I've always wanted a pet #{four}."
puts "Learning Ruby is #{five}!"
end
puts "Welcome to MadLibs: Ruby Edition!"
puts "Press RETURN to begin and CTRL-C (^C) to quit!"
View ex31p.rb
puts "\n"
puts "\n"
puts "\n"
puts "Welcome to the Ultimate Harmonizer Adventure! Will you be able to find Fifth Harmony?"
puts "\n"
puts "REMEMBER: All of your answers must be numbers!"
puts "Press [ENTER] to begin!"
$stdin.gets.chomp
You can’t perform that action at this time.