SlideShare a Scribd company logo
wk2/utility classes.zip
ApplicationUtilities.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CIS247A_Employee
{
public class ApplicationUtilities
{
public static void DisplayApplicationInformation()
{
Console.WriteLine("Welcome the Basic Employee
Program");
Console.WriteLine("CIS247a, Week 2 Lab");
Console.WriteLine("Name: Tevis Boulware");
Console.WriteLine("This program accepts user input as
a string, then makes the nappropriate data conversion and
assigns the value to Employee objects");
Console.WriteLine();
}
public static void DisplayDivider(string outputTitle)
{
Console.WriteLine("n********* " + outputTitle + "
*********n");
}
public static void TerminateApplication()
{
DisplayDivider("Program Termination");
Console.Write("Thank you. Press any key to terminate
the program...");
Console.ReadLine();
}
public static void PauseExecution()
{
Console.Write("nProgram paused, press any key to
continue...");
Console.ReadLine();
Console.WriteLine();
}
}
}
InputUtilities.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CIS247A_Employee
{
public class InputUtilities
{
public static string GetInput(string inputType)
{
string strInput = String.Empty;
Console.Write("Enter the " + inputType + ": ");
strInput = Console.ReadLine();
return strInput;
}
public static string getStringInputValue(string inputType)
{
string value = String.Empty;
bool valid = false;
string inputString = String.Empty;
do
{
inputString = GetInput(inputType);
if (!String.IsNullOrEmpty(inputString))
{
value = inputString;
valid = true;
}
else
{
value = "Invalid input";
valid = false;
}
if (!valid)
Console.WriteLine("Invalid " + inputType + " try
again!");
} while (!valid);
return value;
}
public static int getIntegerInputValue(string inputType)
{
bool valid = false;
int value = 0;
string inputString = String.Empty;
do
{
inputString = GetInput(inputType);
if (!(String.IsNullOrEmpty(inputString)))
{
valid = Int32.TryParse(inputString, out value);
}
if (!valid)
Console.WriteLine("Invalid " + inputType + " try
again!");
} while (!valid);
return value;
}
public static double getDoubleInputValue(string
inputType)
{
bool valid = false;
double value = 0;
string inputString = String.Empty;
do
{
inputString = GetInput(inputType);
if (!(String.IsNullOrEmpty(inputString)))
{
valid = Double.TryParse(inputString, out value);
}
if (!valid)
Console.WriteLine("Invalid " + inputType + " try
again!");
} while (!valid);
return value;
}
public static char getCharInputValue(string inputType)
{
bool valid = false;
char value = 'u';
string inputString = String.Empty;
do
{
inputString = GetInput(inputType);
if (!(String.IsNullOrEmpty(inputString)))
{
valid = Char.TryParse(inputString, out value);
}
if (!valid)
Console.WriteLine("Invalid " + inputType + " try
again!");
} while (!valid);
return value;
}
}
}
wk2/wk2.docx
1. Download the Utility Classes file, which is a zip file that
contains two classes (1) ApplicationUtilities.cs and (2)
InputUtilities.cs. Unzip the two files and place the files in a
known location.
2. Create a new project called
"CIS247_WK2_Lab_LASTNAME". An empty project will then
be created.
3. Right click the project name in the
Solution
Explorer, or select the Project Menu, and select "Add Existing
Item"
4. Navigate to the folder where you saved the (1)
ApplicationUtilities.cs and (2) InputUtilities.cs class files,
select the files, and then click add.
5. The files will be added to your project.
6. The final step is to change the name of the Namespace so all
the classes in the project can recognize each other (there are
advanced ways around this, but for this course may be easiest to
change the namespace. In order to make it easier for the follow
on weeks, change the namespace to all the classes to
"Employee". The file list in the
wk2utility classes.zipApplicationUtilities.csusing System.docx

More Related Content

Similar to wk2utility classes.zipApplicationUtilities.csusing System.docx

Ensure code quality with vs2012
Ensure code quality with vs2012Ensure code quality with vs2012
Ensure code quality with vs2012
Sandeep Joshi
 
Pro typescript.ch03.Object Orientation in TypeScript
Pro typescript.ch03.Object Orientation in TypeScriptPro typescript.ch03.Object Orientation in TypeScript
Pro typescript.ch03.Object Orientation in TypeScript
Seok-joon Yun
 
What’s new in C# 6
What’s new in C# 6What’s new in C# 6
What’s new in C# 6
Fiyaz Hasan
 
Active Software Documentation using Soul and IntensiVE
Active Software Documentation using Soul and IntensiVEActive Software Documentation using Soul and IntensiVE
Active Software Documentation using Soul and IntensiVE
kim.mens
 
The java program that prompts user to enter a string and .pdf
  The java program that prompts user to  enter a string and .pdf  The java program that prompts user to  enter a string and .pdf
The java program that prompts user to enter a string and .pdf
DEEPAKSONI562
 
C# programs
C# programsC# programs
C# programs
Gourav Pant
 
Assignment Java Programming 2
Assignment Java Programming 2Assignment Java Programming 2
Assignment Java Programming 2
Kaela Johnson
 
CDI e as ideias pro futuro do VRaptor
CDI e as ideias pro futuro do VRaptorCDI e as ideias pro futuro do VRaptor
CDI e as ideias pro futuro do VRaptor
Caelum
 
Thread
ThreadThread
Thread
phanleson
 
C# Starter L02-Classes and Objects
C# Starter L02-Classes and ObjectsC# Starter L02-Classes and Objects
C# Starter L02-Classes and Objects
Mohammad Shaker
 
AnswerNote programming specifications and the printing statement.pdf
AnswerNote programming specifications and the printing statement.pdfAnswerNote programming specifications and the printing statement.pdf
AnswerNote programming specifications and the printing statement.pdf
anushasarees
 
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014
First Tuesday Bergen
 
Dependency Injection for Android
Dependency Injection for AndroidDependency Injection for Android
Dependency Injection for Android
First Tuesday Bergen
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests
Tomek Kaczanowski
 
Review Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfReview Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdf
mayorothenguyenhob69
 
HoneySpider Network: a Java based system to hunt down malicious websites
HoneySpider Network: a Java based system to hunt down malicious websitesHoneySpider Network: a Java based system to hunt down malicious websites
HoneySpider Network: a Java based system to hunt down malicious websites
NLJUG
 
Modern Android app library stack
Modern Android app library stackModern Android app library stack
Modern Android app library stack
Tomáš Kypta
 
Dotnet 18
Dotnet 18Dotnet 18
Dotnet 18
dhruvesh718
 
Procedure to create_the_calculator_application java
Procedure to create_the_calculator_application javaProcedure to create_the_calculator_application java
Procedure to create_the_calculator_application java
gthe
 
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptx
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptxCONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptx
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptx
DeepasCSE
 

Similar to wk2utility classes.zipApplicationUtilities.csusing System.docx (20)

Ensure code quality with vs2012
Ensure code quality with vs2012Ensure code quality with vs2012
Ensure code quality with vs2012
 
Pro typescript.ch03.Object Orientation in TypeScript
Pro typescript.ch03.Object Orientation in TypeScriptPro typescript.ch03.Object Orientation in TypeScript
Pro typescript.ch03.Object Orientation in TypeScript
 
What’s new in C# 6
What’s new in C# 6What’s new in C# 6
What’s new in C# 6
 
Active Software Documentation using Soul and IntensiVE
Active Software Documentation using Soul and IntensiVEActive Software Documentation using Soul and IntensiVE
Active Software Documentation using Soul and IntensiVE
 
The java program that prompts user to enter a string and .pdf
  The java program that prompts user to  enter a string and .pdf  The java program that prompts user to  enter a string and .pdf
The java program that prompts user to enter a string and .pdf
 
C# programs
C# programsC# programs
C# programs
 
Assignment Java Programming 2
Assignment Java Programming 2Assignment Java Programming 2
Assignment Java Programming 2
 
CDI e as ideias pro futuro do VRaptor
CDI e as ideias pro futuro do VRaptorCDI e as ideias pro futuro do VRaptor
CDI e as ideias pro futuro do VRaptor
 
Thread
ThreadThread
Thread
 
C# Starter L02-Classes and Objects
C# Starter L02-Classes and ObjectsC# Starter L02-Classes and Objects
C# Starter L02-Classes and Objects
 
AnswerNote programming specifications and the printing statement.pdf
AnswerNote programming specifications and the printing statement.pdfAnswerNote programming specifications and the printing statement.pdf
AnswerNote programming specifications and the printing statement.pdf
 
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014
Dependency Injection for Android @ Ciklum speakers corner Kiev 29. May 2014
 
Dependency Injection for Android
Dependency Injection for AndroidDependency Injection for Android
Dependency Injection for Android
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests
 
Review Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfReview Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdf
 
HoneySpider Network: a Java based system to hunt down malicious websites
HoneySpider Network: a Java based system to hunt down malicious websitesHoneySpider Network: a Java based system to hunt down malicious websites
HoneySpider Network: a Java based system to hunt down malicious websites
 
Modern Android app library stack
Modern Android app library stackModern Android app library stack
Modern Android app library stack
 
Dotnet 18
Dotnet 18Dotnet 18
Dotnet 18
 
Procedure to create_the_calculator_application java
Procedure to create_the_calculator_application javaProcedure to create_the_calculator_application java
Procedure to create_the_calculator_application java
 
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptx
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptxCONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptx
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptx
 

More from ericbrooks84875

Fundamentals of Risk and InsuranceEmmEtt J. Vaughan • .docx
Fundamentals of Risk and InsuranceEmmEtt J. Vaughan   •   .docxFundamentals of Risk and InsuranceEmmEtt J. Vaughan   •   .docx
Fundamentals of Risk and InsuranceEmmEtt J. Vaughan • .docx
ericbrooks84875
 
Fungi reproduce ___________________________ by fragmentation, buddin.docx
Fungi reproduce ___________________________ by fragmentation, buddin.docxFungi reproduce ___________________________ by fragmentation, buddin.docx
Fungi reproduce ___________________________ by fragmentation, buddin.docx
ericbrooks84875
 
Full-Circle LearningMyLab™ Learning Full Circle for Mar.docx
Full-Circle LearningMyLab™ Learning Full Circle for Mar.docxFull-Circle LearningMyLab™ Learning Full Circle for Mar.docx
Full-Circle LearningMyLab™ Learning Full Circle for Mar.docx
ericbrooks84875
 
Functional Behavior Assessment ExampleStudent NameInes SalazarD.docx
Functional Behavior Assessment ExampleStudent NameInes SalazarD.docxFunctional Behavior Assessment ExampleStudent NameInes SalazarD.docx
Functional Behavior Assessment ExampleStudent NameInes SalazarD.docx
ericbrooks84875
 
Functional Requirements Document TemplateVersionDescription .docx
Functional Requirements Document TemplateVersionDescription .docxFunctional Requirements Document TemplateVersionDescription .docx
Functional Requirements Document TemplateVersionDescription .docx
ericbrooks84875
 
Fully answer any ONE of the following essay questions1.  Is the.docx
Fully answer any ONE of the following essay questions1.  Is the.docxFully answer any ONE of the following essay questions1.  Is the.docx
Fully answer any ONE of the following essay questions1.  Is the.docx
ericbrooks84875
 
Fully answer any ONE of the following essay questions1.  Is t.docx
Fully answer any ONE of the following essay questions1.  Is t.docxFully answer any ONE of the following essay questions1.  Is t.docx
Fully answer any ONE of the following essay questions1.  Is t.docx
ericbrooks84875
 
From the weeks chapter reading, we learn from the authors that,.docx
From the weeks chapter reading, we learn from the authors that,.docxFrom the weeks chapter reading, we learn from the authors that,.docx
From the weeks chapter reading, we learn from the authors that,.docx
ericbrooks84875
 
FTER watching the videos and reviewing the other materials in this.docx
FTER watching the videos and reviewing the other materials in this.docxFTER watching the videos and reviewing the other materials in this.docx
FTER watching the videos and reviewing the other materials in this.docx
ericbrooks84875
 
fter completing the reading this week, we reflect on a few key conce.docx
fter completing the reading this week, we reflect on a few key conce.docxfter completing the reading this week, we reflect on a few key conce.docx
fter completing the reading this week, we reflect on a few key conce.docx
ericbrooks84875
 
FS-3FORD MOTOR COMPANY AND SUBSIDIARIESCONSOLIDATED INCO.docx
FS-3FORD MOTOR COMPANY AND SUBSIDIARIESCONSOLIDATED INCO.docxFS-3FORD MOTOR COMPANY AND SUBSIDIARIESCONSOLIDATED INCO.docx
FS-3FORD MOTOR COMPANY AND SUBSIDIARIESCONSOLIDATED INCO.docx
ericbrooks84875
 
Fromm’s concept of the syndrome of decay included three personality .docx
Fromm’s concept of the syndrome of decay included three personality .docxFromm’s concept of the syndrome of decay included three personality .docx
Fromm’s concept of the syndrome of decay included three personality .docx
ericbrooks84875
 
From your readings in Chapter 4, choose one of the organizational sy.docx
From your readings in Chapter 4, choose one of the organizational sy.docxFrom your readings in Chapter 4, choose one of the organizational sy.docx
From your readings in Chapter 4, choose one of the organizational sy.docx
ericbrooks84875
 
From your daily briefs, Kaiser Health News Morning Briefing or P.docx
From your daily briefs, Kaiser Health News Morning Briefing or P.docxFrom your daily briefs, Kaiser Health News Morning Briefing or P.docx
From your daily briefs, Kaiser Health News Morning Briefing or P.docx
ericbrooks84875
 
From the perspective of the public safety field youre in, aspire to.docx
From the perspective of the public safety field youre in, aspire to.docxFrom the perspective of the public safety field youre in, aspire to.docx
From the perspective of the public safety field youre in, aspire to.docx
ericbrooks84875
 
From the following terms Orthodox Judaism, Hassidic Judaism.  Brief.docx
From the following terms Orthodox Judaism, Hassidic Judaism.  Brief.docxFrom the following terms Orthodox Judaism, Hassidic Judaism.  Brief.docx
From the following terms Orthodox Judaism, Hassidic Judaism.  Brief.docx
ericbrooks84875
 
From the end of Chapter 14, complete Discussion Question 3 What are.docx
From the end of Chapter 14, complete Discussion Question 3 What are.docxFrom the end of Chapter 14, complete Discussion Question 3 What are.docx
From the end of Chapter 14, complete Discussion Question 3 What are.docx
ericbrooks84875
 
From the e-Activity, take a position on this statement People that .docx
From the e-Activity, take a position on this statement People that .docxFrom the e-Activity, take a position on this statement People that .docx
From the e-Activity, take a position on this statement People that .docx
ericbrooks84875
 
From Chapter Seven How does horizontal growth differ from v.docx
From Chapter Seven How does horizontal growth differ from v.docxFrom Chapter Seven How does horizontal growth differ from v.docx
From Chapter Seven How does horizontal growth differ from v.docx
ericbrooks84875
 
From the e-Activity, determine the fundamental differences between t.docx
From the e-Activity, determine the fundamental differences between t.docxFrom the e-Activity, determine the fundamental differences between t.docx
From the e-Activity, determine the fundamental differences between t.docx
ericbrooks84875
 

More from ericbrooks84875 (20)

Fundamentals of Risk and InsuranceEmmEtt J. Vaughan • .docx
Fundamentals of Risk and InsuranceEmmEtt J. Vaughan   •   .docxFundamentals of Risk and InsuranceEmmEtt J. Vaughan   •   .docx
Fundamentals of Risk and InsuranceEmmEtt J. Vaughan • .docx
 
Fungi reproduce ___________________________ by fragmentation, buddin.docx
Fungi reproduce ___________________________ by fragmentation, buddin.docxFungi reproduce ___________________________ by fragmentation, buddin.docx
Fungi reproduce ___________________________ by fragmentation, buddin.docx
 
Full-Circle LearningMyLab™ Learning Full Circle for Mar.docx
Full-Circle LearningMyLab™ Learning Full Circle for Mar.docxFull-Circle LearningMyLab™ Learning Full Circle for Mar.docx
Full-Circle LearningMyLab™ Learning Full Circle for Mar.docx
 
Functional Behavior Assessment ExampleStudent NameInes SalazarD.docx
Functional Behavior Assessment ExampleStudent NameInes SalazarD.docxFunctional Behavior Assessment ExampleStudent NameInes SalazarD.docx
Functional Behavior Assessment ExampleStudent NameInes SalazarD.docx
 
Functional Requirements Document TemplateVersionDescription .docx
Functional Requirements Document TemplateVersionDescription .docxFunctional Requirements Document TemplateVersionDescription .docx
Functional Requirements Document TemplateVersionDescription .docx
 
Fully answer any ONE of the following essay questions1.  Is the.docx
Fully answer any ONE of the following essay questions1.  Is the.docxFully answer any ONE of the following essay questions1.  Is the.docx
Fully answer any ONE of the following essay questions1.  Is the.docx
 
Fully answer any ONE of the following essay questions1.  Is t.docx
Fully answer any ONE of the following essay questions1.  Is t.docxFully answer any ONE of the following essay questions1.  Is t.docx
Fully answer any ONE of the following essay questions1.  Is t.docx
 
From the weeks chapter reading, we learn from the authors that,.docx
From the weeks chapter reading, we learn from the authors that,.docxFrom the weeks chapter reading, we learn from the authors that,.docx
From the weeks chapter reading, we learn from the authors that,.docx
 
FTER watching the videos and reviewing the other materials in this.docx
FTER watching the videos and reviewing the other materials in this.docxFTER watching the videos and reviewing the other materials in this.docx
FTER watching the videos and reviewing the other materials in this.docx
 
fter completing the reading this week, we reflect on a few key conce.docx
fter completing the reading this week, we reflect on a few key conce.docxfter completing the reading this week, we reflect on a few key conce.docx
fter completing the reading this week, we reflect on a few key conce.docx
 
FS-3FORD MOTOR COMPANY AND SUBSIDIARIESCONSOLIDATED INCO.docx
FS-3FORD MOTOR COMPANY AND SUBSIDIARIESCONSOLIDATED INCO.docxFS-3FORD MOTOR COMPANY AND SUBSIDIARIESCONSOLIDATED INCO.docx
FS-3FORD MOTOR COMPANY AND SUBSIDIARIESCONSOLIDATED INCO.docx
 
Fromm’s concept of the syndrome of decay included three personality .docx
Fromm’s concept of the syndrome of decay included three personality .docxFromm’s concept of the syndrome of decay included three personality .docx
Fromm’s concept of the syndrome of decay included three personality .docx
 
From your readings in Chapter 4, choose one of the organizational sy.docx
From your readings in Chapter 4, choose one of the organizational sy.docxFrom your readings in Chapter 4, choose one of the organizational sy.docx
From your readings in Chapter 4, choose one of the organizational sy.docx
 
From your daily briefs, Kaiser Health News Morning Briefing or P.docx
From your daily briefs, Kaiser Health News Morning Briefing or P.docxFrom your daily briefs, Kaiser Health News Morning Briefing or P.docx
From your daily briefs, Kaiser Health News Morning Briefing or P.docx
 
From the perspective of the public safety field youre in, aspire to.docx
From the perspective of the public safety field youre in, aspire to.docxFrom the perspective of the public safety field youre in, aspire to.docx
From the perspective of the public safety field youre in, aspire to.docx
 
From the following terms Orthodox Judaism, Hassidic Judaism.  Brief.docx
From the following terms Orthodox Judaism, Hassidic Judaism.  Brief.docxFrom the following terms Orthodox Judaism, Hassidic Judaism.  Brief.docx
From the following terms Orthodox Judaism, Hassidic Judaism.  Brief.docx
 
From the end of Chapter 14, complete Discussion Question 3 What are.docx
From the end of Chapter 14, complete Discussion Question 3 What are.docxFrom the end of Chapter 14, complete Discussion Question 3 What are.docx
From the end of Chapter 14, complete Discussion Question 3 What are.docx
 
From the e-Activity, take a position on this statement People that .docx
From the e-Activity, take a position on this statement People that .docxFrom the e-Activity, take a position on this statement People that .docx
From the e-Activity, take a position on this statement People that .docx
 
From Chapter Seven How does horizontal growth differ from v.docx
From Chapter Seven How does horizontal growth differ from v.docxFrom Chapter Seven How does horizontal growth differ from v.docx
From Chapter Seven How does horizontal growth differ from v.docx
 
From the e-Activity, determine the fundamental differences between t.docx
From the e-Activity, determine the fundamental differences between t.docxFrom the e-Activity, determine the fundamental differences between t.docx
From the e-Activity, determine the fundamental differences between t.docx
 

Recently uploaded

Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
ssuser13ffe4
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
dot55audits
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
Amin Marwan
 

Recently uploaded (20)

Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
 

wk2utility classes.zipApplicationUtilities.csusing System.docx

  • 1. wk2/utility classes.zip ApplicationUtilities.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CIS247A_Employee { public class ApplicationUtilities { public static void DisplayApplicationInformation() { Console.WriteLine("Welcome the Basic Employee Program"); Console.WriteLine("CIS247a, Week 2 Lab"); Console.WriteLine("Name: Tevis Boulware"); Console.WriteLine("This program accepts user input as
  • 2. a string, then makes the nappropriate data conversion and assigns the value to Employee objects"); Console.WriteLine(); } public static void DisplayDivider(string outputTitle) { Console.WriteLine("n********* " + outputTitle + " *********n"); } public static void TerminateApplication() { DisplayDivider("Program Termination"); Console.Write("Thank you. Press any key to terminate the program..."); Console.ReadLine(); } public static void PauseExecution() { Console.Write("nProgram paused, press any key to continue...");
  • 3. Console.ReadLine(); Console.WriteLine(); } } } InputUtilities.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CIS247A_Employee { public class InputUtilities { public static string GetInput(string inputType) { string strInput = String.Empty;
  • 4. Console.Write("Enter the " + inputType + ": "); strInput = Console.ReadLine(); return strInput; } public static string getStringInputValue(string inputType) { string value = String.Empty; bool valid = false; string inputString = String.Empty; do { inputString = GetInput(inputType); if (!String.IsNullOrEmpty(inputString)) { value = inputString; valid = true; }
  • 5. else { value = "Invalid input"; valid = false; } if (!valid) Console.WriteLine("Invalid " + inputType + " try again!"); } while (!valid); return value; } public static int getIntegerInputValue(string inputType) { bool valid = false; int value = 0; string inputString = String.Empty; do
  • 6. { inputString = GetInput(inputType); if (!(String.IsNullOrEmpty(inputString))) { valid = Int32.TryParse(inputString, out value); } if (!valid) Console.WriteLine("Invalid " + inputType + " try again!"); } while (!valid); return value; } public static double getDoubleInputValue(string inputType) { bool valid = false; double value = 0; string inputString = String.Empty;
  • 7. do { inputString = GetInput(inputType); if (!(String.IsNullOrEmpty(inputString))) { valid = Double.TryParse(inputString, out value); } if (!valid) Console.WriteLine("Invalid " + inputType + " try again!"); } while (!valid); return value; } public static char getCharInputValue(string inputType) { bool valid = false; char value = 'u'; string inputString = String.Empty;
  • 8. do { inputString = GetInput(inputType); if (!(String.IsNullOrEmpty(inputString))) { valid = Char.TryParse(inputString, out value); } if (!valid) Console.WriteLine("Invalid " + inputType + " try again!"); } while (!valid); return value; } } }
  • 9. wk2/wk2.docx 1. Download the Utility Classes file, which is a zip file that contains two classes (1) ApplicationUtilities.cs and (2) InputUtilities.cs. Unzip the two files and place the files in a known location. 2. Create a new project called "CIS247_WK2_Lab_LASTNAME". An empty project will then be created. 3. Right click the project name in the Solution Explorer, or select the Project Menu, and select "Add Existing Item" 4. Navigate to the folder where you saved the (1) ApplicationUtilities.cs and (2) InputUtilities.cs class files, select the files, and then click add. 5. The files will be added to your project. 6. The final step is to change the name of the Namespace so all the classes in the project can recognize each other (there are advanced ways around this, but for this course may be easiest to change the namespace. In order to make it easier for the follow on weeks, change the namespace to all the classes to "Employee". The file list in the