I made a simple marijuana information program in which I give the user a list of strains and give the user information about it, like: effects, medical, negatives, and its cannabis type (sativa-Indica).
It's pretty long and I'm sure some stuff can be removed.
First
package Marijuana;
import java.util.Scanner;
//SANCHIT SHARMA
public class First {
public static void main(String[] args) {
Scanner sc1 = new Scanner(System.in);
System.out.println("Welcome to Marijuana info ");
Strains strain = new Strains();
strain.Type();
strain.info();
strain.Effects();
}
}
Strains
package Marijuana;
import java.util.*;
public class Strains {
String name;
int ch;
int ch1;
Scanner sc = new Scanner(System.in);
Strains() {
System.out.println("Select a Strain.");
System.out.println("1. Blue Dream");
System.out.println("2. Sour Diesel");
System.out.println("3. OG Kush");
System.out.println("4. Girl Scout Cookies");
System.out.println("5. Green Crack");
System.out.println("6. Pineapple Express");
System.out.println("7. GrandDaddy Purple");
ch = sc.nextInt();
switch (ch) {
case 1:
System.out.println("Thank you for your input! You chose Blue Dream");
break;
case 2:
System.out.println("Thank you for your input! You chose Sour Diesel");
break;
case 3:
System.out.println("Thank you for your input! You chose OG Kush");
break;
case 4:
System.out.println("Thank you for your input! You chose Girl Scout Cookies");
break;
case 5:
System.out.println("Thank you for your input! You chose Green Crack");
break;
case 6:
System.out.println("Thank you for your input! You chose Pineapple Express");
break;
case 7:
System.out.println("Thank you for your input! You chose GrandDaddy Purple");
break;
}
}
public void Type() {
String type[] = new String[7];
type[0] = "Sativa Dominant Hybrid.";
type[1] = "Invigorating Sativa.";
type[2] = "Remains a Debatable mystery.";
type[3] = "OG Kush and Durban Poison hybrid. Type remains a mystery";
type[4] = "75% indica variety of Green Crack is said to have come from an Afghani strain";
type[5] = "The child of Trainwreck and Hawaiian. Type remains a mystery";
type[6] = "GrandDaddy Purple is a famous indica cross between Purple Urkle and Big Bud";
for (int i = 0; i < type.length; i++) {
if (ch == 7) {
System.out.println("What type of cannabis? " + type[6]);
System.out.println();
break;
}
if (i == ch) {
System.out.println("What type of cannabis? " + type[i - 1]);
System.out.println();
}
}
}
public void info() {
String type[] = new String[7];
type[0] = "Blue Dream balances full-body relaxation with gentle cerebral invigoration. Novice and veteran consumers alike enjoy the level effects of \nBlue Dream, which ease you gently into a calm euphoria.";
type[1] = "This fast-acting strain delivers energizing, dreamy cerebral effects that have pushed Sour Diesel to its legendary status. \nStress, pain, and depression fade away in long-lasting relief that makes Sour Diesel a top choice among medical patients. ";
type[2] = "It has an earthy pine scent with woody undertones, an aroma that has become the signature of OG Kush varieties and descendants. \nWith OG Kush, patients most commonly cite improvements in migraines, ADD/ADHD, and stress disorders.";
type[3] = "Girl Scout Cookies launches you to euphoria’s top floor where full-body relaxation meets a time-bending cerebral space. \nA little goes a long way with this hybrid, whose THC heights have won Girl Scout Cookies numerous Cannabis Cup awards.";
type[4] = "Few strains compare to Green Crack’s sharp energy and focus as it induces an invigorating mental buzz that keeps you going throughout the day. \nWith a tangy, fruity flavor redolent of mango, Green Crack is the perfect daytime medication for patients treating fatigue, stress, and depression.";
type[5] = "The smell has been likened to fresh apple and mango, with a taste of pineapple, pine and cedar. \nThis hard-hitting sativa provides an energetic high up to 2 hours and has a THC content up to 17% with CBD of 0.17%. ";
type[6] = "Its potent psychoactive effects are clearly detectable in both mind and body, delivering a fusion of cerebral euphoria and physical relaxation.\nGranddaddy Purple is typically pulled off the shelf to treat pain, stress, insomnia, appetite loss, and muscle spasms. ";
for (int i = 0; i < type.length; i++) {
if (ch == 7) {
System.out.println(type[6]);
break;
}
if (ch == i)
System.out.println(type[i - 1]);
}
System.out.println();
}
public void Effects() {
String BD = "Happy: 10 " + "Euphoric: 9 " + "Releaxed: 8.5 " + "Uplifted: 8 " + "Creative: 6.5 ";
String BDM = "Stress: 10 " + "Depression: 7 " + "Pain: 6.75 ";
String BDN = "Dry Mouth: 10 " + "Dry Eyes: 5 " + "Paranoid: 3.5 ";
String SD = "Happy: 10 " + "Euphoric: 8.5 " + "Releaxed: 8 " + "Uplifted: 7.5 " + "Creative: 6 ";
String SDM = "Stress: 10 " + "Depression: 7 " + "Pain: 6 ";
String SDN = "Dry Mouth: 10 " + "Dry Eyes: 5.5 " + "Paranoid: 3 ";
String OG = "Happy: 10 " + "Euphoric: 8 " + "Releaxed: 10 " + "Uplifted: 6 " + "Creative: 5 ";
String OGM = "Stress: 10 " + "Depression: 6.5 " + "Pain: 6.75 ";
String OGN = "Dry Mouth: 10 " + "Dry Eyes: 7 " + "Paranoid: 3 ";
String GSC = "Happy: 10 " + "Euphoric: 9 " + "Releaxed: 8.5 " + "Uplifted: 6 " + "Creative: 5 ";
String GSCM = "Stress: 10 " + "Depression: 7 " + "Pain: 6.75 ";
String GSCN = "Dry Mouth: 10 " + "Dry Eyes: 5 " + "Paranoid: 2 ";
String GC = "Happy: 9.5 " + "Euphoric: 7 " + "Energetic: 10 " + "Uplifted: 8.5 " + "Creative: 6 ";
String GCM = "Stress: 10 " + "Depression: 8 " + "Pain: 6 ";
String GCN = "Dry Mouth: 10 " + "Dry Eyes: 5 " + "Paranoid: 3.5 ";
String PE = "Happy: 10 " + "Euphoric: 8 " + "Releaxed: 7" + "Uplifted: 7 " + "Creative: 6.5 ";
String PEM = "Stress: 10" + "Depression: 7" + "Pain: 6";
String PEN = "Dry Mouth: 10 " + "Dry Eyes: 5.5 " + "Paranoid: 2.5 ";
String GDP = "Happy: 7" + "Euphoric: 6.5" + "Releaxed: 10" + "Hungry: 5 " + "Sleepy: 6.5 ";
String GDPM = "Stress: 10 " + "Depression: 6 " + "Pain: 9 ";
String GDPN = "Dry Mouth: 10 " + "Dry Eyes: 5.5 " + "Paranoid: 3";
System.out.println("What Would You like to know");
System.out.println("1. Effects");
System.out.println("2. Medical attributes");
System.out.println("3. Negatives");
System.out.println("4. Everything altogether");
ch1 = sc.nextInt();
switch (ch1) {
case 1:
if (ch == 1) {
System.out.println(BD);
}
if (ch == 2) {
System.out.println(SD);
}
if (ch == 3) {
System.out.println(OG);
}
if (ch == 4) {
System.out.println(GSC);
}
if (ch == 5) {
System.out.println(GC);
}
if (ch == 6) {
System.out.println(PE);
}
if (ch == 7) {
System.out.println(GDP);
}
break;
case 2:
if (ch == 1) {
System.out.println(BDM);
}
if (ch == 2) {
System.out.println(SDM);
}
if (ch == 3) {
System.out.println(OGM);
}
if (ch == 4) {
System.out.println(GSCM);
}
if (ch == 5) {
System.out.println(GCM);
}
if (ch == 6) {
System.out.println(PEM);
}
if (ch == 7) {
System.out.println(GDPM);
}
break;
case 3:
if (ch == 1) {
System.out.println(BDN);
}
if (ch == 2) {
System.out.println(SDN);
}
if (ch == 3) {
System.out.println(OGN);
}
if (ch == 4) {
System.out.println(GSCN);
}
if (ch == 5) {
System.out.println(GCN);
}
if (ch == 6) {
System.out.println(PEN);
}
if (ch == 7) {
System.out.println(GDPN);
}
break;
case 4:
if (ch == 1) {
System.out.println(BD);
System.out.println(BDM);
System.out.println(BDN);
}
if (ch == 2) {
System.out.println(SD);
System.out.println(SDM);
System.out.println(SDN);
}
if (ch == 3) {
System.out.println(OG);
System.out.println(OGM);
System.out.println(OGN);
}
if (ch == 4) {
System.out.println(GSC);
System.out.println(GSCM);
System.out.println(GSCN);
}
if (ch == 5) {
System.out.println(GC);
System.out.println(GCM);
System.out.println(GCN);
}
if (ch == 6) {
System.out.println(PE);
System.out.println(PEM);
System.out.println(PEN);
}
if (ch == 7) {
System.out.println(GDP);
System.out.println(GDPM);
System.out.println(GDPN);
break;
}
}
}
}