Skip to content

Instantly share code, notes, and snippets.

View minor's full-sized avatar
😴
working

saurish minor

😴
working
View GitHub Profile
@minor
minor / Orders.java
Created May 20, 2020 03:59
Orders.java
/** Saurish Srivastava: May 19 2020: Purpose of the program: calculates information about orders of shirts and pants. All orders have a quantity and a color.*/
package com.finalexam;
import java.util.ArrayList;
public class Orders {
public static void main(String[] args) {
/* Define variables and ArrayList */
int numberOfShirts = 0;
@minor
minor / Clothing.java
Created May 20, 2020 03:32
Shirt.java
package com.finalexam;
public class Clothing {
public int quantity;
public String color;
public Clothing() {
quantity = 0;
color = "";
}
@minor
minor / Account.java
Created May 5, 2020 03:40
Account.java
package com.saurishsrivastava;
public class Account {
private long number = 0;
private double balance = 0.0;
private java.util.Date dateCreated;
public Account() {
this.number = 0;
this.balance = 0.0;
@minor
minor / LockerPuzzle.java
Created March 26, 2020 18:07
LockerPuzzle.java; Professor Estrada HW
package com.saurishsrivastava;
/* name: Saurish Srivastava; locker puzzle, will determine whether or not the locker is opened after a series of students opening it: 10 PM on 24 March 2020 */
public class LockerPuzzle {
/**
* Main method
*/
public static void main(String[] args) {
/* create the Locker array */
boolean[] lockers = new boolean[101]; // create a locker array of 101 booleans (we will get rid of the 0th boolean)
@minor
minor / Statistics.java
Created February 29, 2020 05:21
Professor Estrada: Part 2
package com.saurishsrivastava;
/* name: Saurish Srivastava; strings and loops - part 2: displays total number of items, average price, and standard deviation of the prices given by user */
/* import used packages */
import java.util.ArrayList;
import java.util.Scanner;
public class Statistics {
/**
* Main method
@minor
minor / Intervals.java
Created February 14, 2020 03:51
Professor Estrada: Part 3 Homework Assignment
package com.saurishsrivastava;
/** part 3: this program is used to take two time intervals and compare them with a series of calculations. */
/** import used packages */
import java.util.Scanner;
public class Intervals {
/** Main method */
public static void main(String[] args) {
/** declare variables and initialize Scanner */
@minor
minor / Organization.java
Last active December 7, 2017 02:28
Organization.java Code
package com.saurishsrivastava;
public class Organization {
public static void main(String[] args) {
/** Books **/
Book book1 = new Book("Talon");
book1.setAuthor("Julie Kagawa");