Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C# Programming For this project youre going to create a console application with two classes in addition to the Program.cs class thats generated when you

C# Programming

For this project youre going to create a console application with two classes in addition to the Program.cs class thats generated when you create a new Console Application project. Dont change the name of Program.cs.

The first class will be called StudentClass and will have the following private attributes with associated getters and setters:

String Name, String Major, String GraduationYear, Double GPA.

The second class will be called EmployeeClass and will have the following private attributes with associated getters and setters:

String Name, String Department, Double Salary.

Along with the private attributes for each class youll create a getter and setter for each attribute as well as a constructor in which youll pass the data in through the parameters and set the properties in that constructor method. Youre going to create a menu that gives the user options to: Add a student / Add an employee / View all students / View all employees / Exit.

image text in transcribed

If they choose View all Students or View all Employees and none have been entered then youre going to tell them that none have been entered.

image text in transcribed

Pressing any key will bring them back to the menu. If they select Add a Student then youre going to clear the screen and prompt them for each attribute one by one.

image text in transcribed You will code your app for error checking so that if the user doesnt enter anything for a string value you will prompt them that the value cant be null and you will prompt them again.

image text in transcribed

If they enter anything other than a number for Student GPA or Employee Salary then youll tell them that they need to enter a number.

image text in transcribed

Once you have valid input for the student or employee then youre going to store the students in a List of StudentClass Objects, and the employees in a List of EmployeeClass Objects.

When the user wants to view students or employees youll check the count of the List and if the count is zero then thats when youll tell them that there are none saved.

image text in transcribed

If there are records saved then youll list them in a neatly formatted way.

image text in transcribed

image text in transcribed

* *** *** ****** ***** **** ** :007atas e axew *** **** *** ******** * 71X3 (S 4) View all Employees 3) View all Students akordusue PPY (Z quapnis e PPF (T ******************************************* nuaw ako i dus/tuapnis ******************************************* ************************************* View Students You have not added any students yet. Press any key to continue View Employees ************************************* You have not added any employees yet. Press any key to continue Add Student Inter student full name: Joe Smith Enter student major: Accounting Enter student! graduation year: 2018 Enter student's GPA: 3.9 Student added. Press any key to continue uuuu Add Employee Enter emplo full name: Alice Jones Enter employ ee's department: Billing Enter employee's salary: 29000 Employee added. Press any key to continue Add Student Enter student's full name : Your answer cannot be empty. Please try again! Enter student's full name: Add Employer Enter employee's full name: Ed Smith Enter employ department: Maintenance Enter employee's salary: none That is not a valid number. Please try again! Enter employee's salary: View Students ************************************* You have not added any students yet. Press any key to continue RRRRRRRR Name Major Graduation Year Grade Point Average Joe Mama Alyin Chipmunk Delores Jones Press any key to continue CIS Art Sociology Salary View Employees *************** ***************** Name Department --------------- Jamie Somers Management Steve Austin Press any key to continue $ 77000.5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visualizing Health And Healthcare Data Creating Clear And Compelling Visualizations To See How Youre Doing

Authors: Katherine Rowell ,Lindsay Betzendahl ,Cambria Brown

1st Edition

1119680883, 978-1119680888

More Books

Students also viewed these Databases questions

Question

6. What actions might make employers lose elections?

Answered: 1 week ago

Question

Compare the different types of employee separation actions.

Answered: 1 week ago

Question

Assess alternative dispute resolution methods.

Answered: 1 week ago

Question

Distinguish between intrinsic and extrinsic rewards.

Answered: 1 week ago