Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace classstudent1
- {
- class StudentDetails
- {
- Student st = new Student{"Eric Jhun", "Sanchez", "BSIT", "Programming", "MINSCAT BONGABONG CAMPUS", "ericjhun", "2019-0053"};
- public void displayOutput()
- {
- Console.WriteLine("{0} {1} is a BSIT Student", st.FirstName, st.LastName, st.Student);
- Console.WriteLine("{0} {1} He choose a Programming Course", st.FirstName, st.LastName, st.Course);
- Console.WriteLine("{0} {1} He studying in MINSCAT BONGABONG CAMPUS", st.FirstName, st.LastName, st.University);
- Console.WriteLine("{0} {1}'s E-mail is ericjhun", st.FirstName, st.LastName, st.Email);
- Console.WriteLine("{0} {1}'s ID is 2019-0053", st.FirstName, st.LastName, st.ID);
- }
- }
- }
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace classstudent1
- {
- class Student
- {
- public Student(string firstName, string lastName, string course, string subject, string university, string email, int id)
- {
- FirstName = firstName;
- LastName = lastName;
- Course = course;
- Subject = subject;
- University = university;
- Email = email;
- ID = id;
- }
- public string FirstName { get; set; }
- public string LastName { get; set; }
- public string Course { get; set; }
- public string Subject { get; set; }
- public string University { get; set; }
- public string Email { get; set; }
- public int ID { get; set; }
- }
- }
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace classstudent1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Student st = new Student();
- st.displayOutput();
- {
- StudentDetails sd = new StudentDetails();
- sd.displayOutput();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement