CIS247_WK2_Lab_PATEL - Vrajesh Patel Ilab Week 2 Object-Oriented Programming with C Prof Nana DeVry University 14th May 2016 Code:Program.cs using using

CIS247_WK2_Lab_PATEL - Vrajesh Patel Ilab Week 2...

This preview shows page 1 - 3 out of 7 pages.

Vrajesh Patel Ilab: Week 2 Object-Oriented Programming with C# Prof. Nana DeVry University 14 th May, 2016
Image of page 1
Code:- Program.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CIS247A_Employee { class Program { static void Main( string [] args) { ApplicationUtilities .DisplayApplicationInformation(); ApplicationUtilities .DisplayDivider( "Start Program" ); ApplicationUtilities .DisplayDivider( "Prompt for Employee information and create first employee" ); //Create the First Employee object using the default constructor Employee employee1 = new Employee (); employee1.firstName = InputUtilities .getStringInputValue( "First Name" ); employee1.lastName = InputUtilities .getStringInputValue( "Last Name" ); employee1.gender = InputUtilities .getCharInputValue( "Gender" ); employee1.dependents = InputUtilities .getIntegerInputValue( "# Dependents" ); employee1.annualSalary = InputUtilities .getDoubleInputValue( "Annual Salary" ); //Display Employee 1 information Console .WriteLine(employee1.ToString()); ApplicationUtilities .PauseExecution(); //Create the Second Employee using the Paramaterized Consturctor Employee employee2 = new Employee ( "Sue" , "Smith" , 'F' , 3, 52000); //display Employee 2 information Console .WriteLine(employee2.ToString()); ApplicationUtilities .TerminateApplication();
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 7 pages?

  • Summer '14
  • Subroutine, Return statement, Void type, public Employee, string inputType

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes