Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can anyone please help me with this To store the employee data in the findEmployee() function, we use a pointer that refers to a Email:

Can anyone please help me with this

image text in transcribedimage text in transcribedimage text in transcribed
To store the employee data in the findEmployee() function, we use a pointer that refers to a Email: dmurphy@classicmodelcars . com variable of type structure called Employee. The Employee structure has the following members: Office Code: 1 Manager ID: 0 Job Title: President struct Employee{ int_employeeNumber; -#* *HR Menu* *# char lastName [50] ; Find Employee char firstName [50] ; Employees Report char extension [10] ; 3) Add Employee char email [100] ; 4) Update Employee char officecode[10] ; 5) Remove Employee int reportsTo 0) Exit 6Title[50] ; char joblit Enter an option (0-5) : 1 Enter Employee Number: 1078 Employee 1078 does not exist. The Reports To member stores the employee ID of the employee who is the manager of the given employee number. void displayAllEmployees(Connection * conn); If the employee exists, store the employee data into the members of an Employee variable using the If the user selects option 2 (Employees Report), call function displayAllEmployees(). third parameter in the findEmployee() function which references to that variable of type Employee. This function receives a pointer of type OCCI Conection (a reference variable to an Oracle database) and displays all employees' information if exist. void displayEmployee(Connection * conn, struct Employee emp); If the user selects option 1, prompt the user to enter a value for the employee number. Then, call 1) Find Employee function findEmployee() to check if the employee with the given employee number exists. If the 2) Employees Report returning value of function findEmployee() is o, display a proper error message. 3) Add Employee 4) Update Employee Sample error message: 5) Remove Employee 0) Exit Employee 1122 does not exist. Enter an option (0-5) : 2 Otherwise, call the function displayEmployee() to display the employee information. ID Employee Name Email Phone Extension Manager Name This function receives a Connection pointer (a reference variable to an Oracle database) and the 1002 Diane Murphy dmurphy@classicmodelcars.com +1 650 219 4782 *58de members of a variable of type Employee and displays all members of the emp parameter. 1056 Mary Patterson mpattersonclassicmodelcars.com +1 650 219 4782 x4611 Diane Murphy 1076 Jeff Firrelli ifirrelligclassicmodelcars.com +1 650 219 4782 x9273 Diane Murphy 1088 William Patterson wpatterson@classicmodelcars.com +61 2 9264 2451 *4871 Mary Patterson See the following sample output: 1102 Gerard Bondur gbondur@classicmodelcars. com +33 14 723 4484 x5408 Mary Patterson 1143 Anthony Bow abowaclassicmodelcars.com +1 650 219 4782 x5428 Mary Patterson *#4##* HR Menu -#-#* 1165 Leslie Jennings 1jennings@classicmodelcars.com +1 650 219 4782 x3291 Anthony Bow 1) Find Employee 1166 Leslie Thompson 1thompson@classicmodelcars.com +1 650 219 4782 x4065 Anthony Bow 2) Employees Report 1188 Julie Firrelli jfirrelli@classicmodelcars.com +1 215 837 0825 x2173 Anthony Bow 1216 Steve Patterson spatterson classicmodelcars.com +1 215 837 0825 x4334 Anthony Bow 3) Add Employee 1286 Foon Yue Tseng ftseng@classicmodelcars.com +1 212 555 300 x228 Anthony Bow 4) Update Employee 1323 George Vanauf gvanauf@classicmodelcars.com +1 212 555 300 *4102 Anthony Bow Remove Employee 1337 Loui Bondur 1bondur@classicmodelcars . com +33 14 723 4484 x6493 Gerard Bondur 0) Exit 1370 Gerard Hernandez ghernande@classicmodelcars.com +33 14 723 4484 x2028 Gerard Bondur Enter an option (0-5) : 1 1401 Pamela Castillo pcastillo@classicmodelcars.com +33 14 723 4404 x2759 Gerard Bondur Enter Employee Number: 1002 1501 Larry Bott 1bott@classicmodelcars.com +44 20 7877 2041 x2311 Gerard Bondur 1504 Barry Jones bjones@classicmodelcars. com +44 20 7877 2841 *182 Gerard Bondur 1611 Andy Fixter afixter@classicmodelcars.com +61 2 9264 2451 x101 William Patterson Employee Information 1612 Peter Marsh pmarsh@classicmodelcars.com +61 2 9264 2451 x102 William Patterson Employee Number: 1002 1619 Ton King tking@classicmodelcars.com +61 2 9264 2451 x103 William Patterson Last Name: Murphy 1621 Mani Nishi mnishi@classicmodelcars.com +81 33 224 5000 x101 Mary Patterson First Name: Diane 1625 Yoshimi Kato ykato@classicmodelcars.com +81 33 224 5080 x102 Mami Nishi Extension: x5800 1702 Martin Gerard mgerard@classicmodelcars. com +33 14 723 4404 x2312 Gerard BondurObjective: In this assignment, you create a simple HR application using the C++ programming language and Oracle. This assignment helps students learn a basic understanding of application development using C++ programming and an Oracle database. Instruction: In this assignment, we use the same database that you use for the labs. Note: For each query in your assignment, make sure you handle the errors and display the proper message including the error_code and the error message. tryf } catch (SQLExceptions sqlExcp) { cout

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions