Sunteți pe pagina 1din 3

Arvin L.

Hipolito – Computer Programming II Java Assignment

My Code in Java:
import java.util.Scanner;

public class ArvinAssignment {

public static void main(String[] args) {


// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);

System.out.print("Name: ");
String name=sc.nextLine();

System.out.print("Course: ");
String course=sc.nextLine();

System.out.print("Year Level: ");


String yearl=sc.nextLine();

/* i did not put the edmodo class code because it was privately given by instructors even other instructor show it*\
String sched= " (Schedule of Class in BSCS - 2) ";
String cs= " / Time / Days / Course Code and Title / Instructor /";
String line1= " /_________________/_________/__________________________________________________________/_________________________/";
String class1 = " / 2:00-4:00 PM / Mon / SF 101 - System Fundamental(Lec) / Michael Farin /";
String class2 = " / 2:00-4:00 PM / Wed / CC 103 - Computer Programming II (Lec) / Maricel Aglibot /";
String class3 = " / 2:00-5:00 PM / F / DS 101 - Discrete Structures 1 / Edgardo Dela Rosa Jr. /";
String class4 = " / 5:00-6:00 PM / MWF / GEC 2a - Reading in Philippines History (IP Education) / Herbert Himalin /";
String class5 = " / 6:00-7:00 PM / MWF / GEC 6 - Art Appreciation / Iratus Glenn Cruz /";
String class6 = " / 9:00-10:30 AM / Tth / MTN 4 - Calculus / Edgardo Dela Rosa Jr. /";
String class7 = " / 10:30-12:00 PM / Tth / CC 103 - Computer Programming II (Lab) / Maricel Aglibot /";
String class8 = " / 1:00-2:30 PM / Tth / SF 101 - System Fundamentals (Lab) / Michael Farin /";
String class9 = " / 2:30-4:00 PM / Tth / FILN 3 - SineSosyedad/Pelikulang Panlipunan / Mel Elacion Paje /";
String class10 =" / 1:00-3:00 PM / Sat / PEN 3 - Individual and Dual Sports / Ernel Abella /";
String line2= " /_________________/_________/__________________________________________________________/_________________________/";
System.out.println(sched+"\n"+cs+"\n"+line1+"\n"+class1+"\n"+class2+"\n"+class3+"\n"+class4+"\n"+class5+"\n"+class6+"\n"+class7+"\n"+class8+"\n"+
class9+"\n"+class10+"\n"+line2);

System.out.print("Present Class: ");


String presentc=sc.nextLine();

System.out.print("Class Schedule: ");


String classsched=sc.nextLine();

System.out.print("Subject: ");
Arvin L. Hipolito – Computer Programming II Java Assignment

String subject=sc.nextLine();

System.out.print("Code: ");
String code=sc.nextLine();
//code "dx5m9k"

System.out.print("Day: ");
String day =sc.nextLine();
System.out.print("Month: ");
String month=sc.nextLine();
System.out.print("Year: ");
String year =sc.nextLine();
/* in this code i used the String to convert it into int so that the code string below the date and time will be read in the ouput
of program.
because if i only used int only and if i didn't convert it the code string below will not run properly, i mean the time and
instructor will be run at the same time.*/
int d = Integer.parseInt( day );
int m = Integer.parseInt( month );
int y = Integer.parseInt( year );

// i used String in time because i want to input what time of classes for example: AM/PM.
System.out.print("Time: ");
String time=sc.nextLine();

System.out.print("Instructor: ");
String instructor=sc.nextLine();

System.out.println("\t");
System.out.println(" (Student Information) ");
System.out.println("Name: "+name);
System.out.println("Course: "+course);
System.out.println("Year Level: "+yearl);
System.out.println("Present Class: "+presentc);
System.out.println("Class Schedule: "+classsched);
System.out.println("Subject: "+subject);
System.out.println("Code: "+code);
System.out.println("Date and Time: "+d+"//"+m+"//"+y+" - "+time);
System.out.println("Instructor: "+instructor);
}
}
Arvin L. Hipolito – Computer Programming II Java Assignment

Output of My Program:
Name: Arvin L. Hipolito
Course: Bachelor of Science in Computer Science
Year Level: Second Year
(Schedule of Class in BSCS - 2)
/ Time / Days / Course Code and Title / Instructor /
/_________________/_________/__________________________________________________________/_________________________/
/ 2:00-4:00 PM / Mon / SF 101 - System Fundamental(Lec) / Michael Farin /
/ 2:00-4:00 PM / Wed / CC 103 - Computer Programming II (Lec) / Maricel Aglibot /
/ 2:00-5:00 PM / F / DS 101 - Discrete Structures 1 / Edgardo Dela Rosa Jr. /
/ 5:00-6:00 PM / MWF / GEC 2a - Reading in Philippines History (IP Education) / Herbert Himalin /
/ 6:00-7:00 PM / MWF / GEC 6 - Art Appreciation / Iratus Glenn Cruz /
/ 9:00-10:30 AM / Tth / MTN 4 - Calculus / Edgardo Dela Rosa Jr. /
/ 10:30-12:00 PM / Tth / CC 103 - Computer Programming II (Lab) / Maricel Aglibot /
/ 1:00-2:30 PM / Tth / SF 101 - System Fundamentals (Lab) / Michael Farin /
/ 2:30-4:00 PM / Tth / FILN 3 - SineSosyedad/Pelikulang Panlipunan / Mel Elacion Paje /
/ 1:00-3:00 PM / Sat / PEN 3 - Individual and Dual Sports / Ernel Abella /
/_________________/_________/__________________________________________________________/_________________________/
Present Class: CC 103 - Computer Programming II
Class Schedule: Wed - TTH
Subject: Computer Programming II
Code: dx5m9k
Day: 28
Month: 11
Year: 2020
Time: 10:30 - 12:00 PM
Instructor: Maricel Aglibot

(Student Information)
Name: Arvin L. Hipolito
Course: Bachelor of Science in Computer Science
Year Level: Second Year
Present Class: CC 103 - Computer Programming II
Class Schedule: Wed - TTH
Subject: Computer Programming II
Code: dx5m9k
Date and Time: 28//11//2020 - 10:30 - 12:00 PM
Instructor: Maricel Aglibot

S-ar putea să vă placă și