SlideShare a Scribd company logo
1 of 10
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 vs2012Sandeep 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 TypeScriptSeok-joon Yun
 
What’s new in C# 6
What’s new in C# 6What’s new in C# 6
What’s new in C# 6Fiyaz 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 IntensiVEkim.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 .pdfDEEPAKSONI562
 
Assignment Java Programming 2
Assignment Java Programming 2Assignment Java Programming 2
Assignment Java Programming 2Kaela 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 VRaptorCaelum
 
C# Starter L02-Classes and Objects
C# Starter L02-Classes and ObjectsC# Starter L02-Classes and Objects
C# Starter L02-Classes and ObjectsMohammad 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.pdfanushasarees
 
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 2014First 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 TestsTomek 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 .pdfmayorothenguyenhob69
 
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 websitesNLJUG
 
Modern Android app library stack
Modern Android app library stackModern Android app library stack
Modern Android app library stackTomáš Kypta
 
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 javagthe
 
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptx
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptxCONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptx
CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING.pptxDeepasCSE
 

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
Dependency Injection for AndroidDependency Injection for Android
Dependency Injection for Android
 
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
 
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 • .docxericbrooks84875
 
Fungi reproduce ___________________________ by fragmentation, buddin.docx
Fungi reproduce ___________________________ by fragmentation, buddin.docxFungi reproduce ___________________________ by fragmentation, buddin.docx
Fungi reproduce ___________________________ by fragmentation, buddin.docxericbrooks84875
 
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.docxericbrooks84875
 
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.docxericbrooks84875
 
Functional Requirements Document TemplateVersionDescription .docx
Functional Requirements Document TemplateVersionDescription .docxFunctional Requirements Document TemplateVersionDescription .docx
Functional Requirements Document TemplateVersionDescription .docxericbrooks84875
 
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.docxericbrooks84875
 
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.docxericbrooks84875
 
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,.docxericbrooks84875
 
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.docxericbrooks84875
 
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.docxericbrooks84875
 
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.docxericbrooks84875
 
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 .docxericbrooks84875
 
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.docxericbrooks84875
 
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.docxericbrooks84875
 
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.docxericbrooks84875
 
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.docxericbrooks84875
 
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.docxericbrooks84875
 
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 .docxericbrooks84875
 
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.docxericbrooks84875
 
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.docxericbrooks84875
 

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

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 

Recently uploaded (20)

Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

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