Skip to content

Instantly share code, notes, and snippets.

View chamellion's full-sized avatar

Odumosu Babatunde Peter chamellion

View GitHub Profile
package main.servo;
import com.phidget22.*;
import java.io.IOException;
public class CSCM79 {
private static final int SERVO_SERIAL_NUMBER = 19946;
private static final int LCD_SERIAL_NUMBER = 39834;
package plab;
import java.util.ArrayList;
import java.util.Scanner;
public class AssessedPart {
public static void main(String[] args) {
ArrayList<Integer> ageArray = new ArrayList<>();
ArrayList<String > namesArray = new ArrayList<>();
import java.util.Locale;
import java.util.Scanner;
public class LabThreeQ3 {
public static void main(String[] args) {
String countryOne = "Albania";
String countryTwo = "Moldova";
String countryThree = "Slovakia";
String countryFour = " North Macedonia";
@chamellion
chamellion / LabThreeQ2.java
Created October 23, 2022 20:57
CSCM_41 LAB
import java.util.Scanner;
public class LabThreeQ2 {
public static void main(String[] args) {
System.out.println("Please enter the earthquake magnitude below: ");
String smallShake = "Noticeable shaking of indoor objects and rattling noises." +
" Felt by most people in the affected area. Slightly felt outside. " +
"Generally causes zero to minimal damage. Moderate to significant damage very unlikely." +
" Some objects may fall off shelves or be knocked over.";
@chamellion
chamellion / LabThree.java
Created October 23, 2022 20:56
CSCM_41 LAB
import java.util.Scanner;
public class LabThree {
public static void main(String[] args) {
System.out.println("Please enter the hour of the day.. ");
System.out.println("Hint.. Please enter hour of day in 24hrs time format i.e 1 - 24...");
Scanner scanner = new Scanner(System.in);
if (scanner.hasNextInt()){
int hourOfDay = scanner.nextInt();
import java.util.Scanner;
public class LabThreeQ4 {
public static void main(String[] args) {
System.out.println("Welcome to date validator. Please enter a valid day of the month: ");
Scanner scanner = new Scanner(System.in);
if (scanner.hasNextInt()) {
int day = scanner.nextInt();
if (day > 0 && day <= 31) {
@chamellion
chamellion / Chat.js
Created August 24, 2022 20:29
Chat on booklist
import React, {useEffect, useState} from 'react';
import SafeAreaContainer from "../../components/SafeAreaContainer";
import {
Alert,
FlatList, KeyboardAvoidingView, LayoutAnimation,
StyleSheet,
Text,
TextInput,
ToastAndroid,
TouchableOpacity,
@chamellion
chamellion / CurriculumContent.js
Created August 24, 2022 20:26
The curriculum content
import React, {useCallback, useEffect, useMemo, useRef, useState} from "react";
import SafeAreaContainer from "../../components/SafeAreaContainer";
import {
Alert,
Dimensions,
Linking,
ScrollView,
StyleSheet,
Text,
ToastAndroid,