Details of this Paper

Write a program that keeps an employee database in a random-access

Description

solution


Question

The Assignment is due today and this is how it reads. Write a program that keeps an employee database in a random-access file Implement functions for adding and removing employees. You need not keep employees in sorted order. To remove an employee, just fill the entire record with spaces. When adding an employee, try to add it into one of those empty spots first before appending it to the end of the file.;Here is what I have so far.;#include;#include;#include;#include;#include;using namespace std;/**;A basic employee class that is used in many examples;in the book "Computing Concepts with C++ Essentials;*/;class Employee;public;/**;Constructs an employee with empty name and no salary.;*/;Employee();/**;Constructs an employee with a given name and salary.;@param employee_name the employee name;@param initial_salary the initial salary;*/;Employee(string employee_name, double initial_salary);/**;Sets the salary of this employee.;@param new_salary the new salary value;*/;void set_salary(double new_salary);/**;Gets the salary of this employee.;@return the current salary;*/;double get_salary() const;/**;Gets the name of this employee.;@return the employee name;*/;string get_name() const;void set_name(string newName);private;string name;double salary;/**;Constructs an employee with empty name and no salary.;*/;Employee::Employee();Employee::name = "New Employee;Employee::salary = 0;/**;Constructs an employee with a given name and salary.;@param employee_name the employee name;@param initial_salary the initial salary;*/;Employee::Employee(string employee_name, double initial_salary);Employee::name = employee_name;Employee::salary = initial_salary;/**;Sets the salary of this employee.;@param new_salary the new salary value;*/;void Employee::set_salary(double new_salary);Employee::salary = new_salary;The error message that I am receiving is as follows from my compiler.;1>------ Build started: Project: Lab_20, Configuration: Debug Win32 ------;1> main.cpp;1>e:\2014 classes\c++\week 10\lab_20\lab_20\main.cpp(114): error C2143: syntax error: missing ',' before ':;1>e:\2014 classes\c++\week 10\lab_20\lab_20\main.cpp(115): error C2143: syntax error: missing ',' before '{;1>e:\2014 classes\c++\week 10\lab_20\lab_20\main.cpp(148): error C2143: syntax error: missing ',' before ':;1>e:\2014 classes\c++\week 10\lab_20\lab_20\main.cpp(149): error C2143: syntax error: missing ',' before '{;1>e:\2014 classes\c++\week 10\lab_20\lab_20\main.cpp(213): error C2143: syntax error: missing ',' before ':;1>e:\2014 classes\c++\week 10\lab_20\lab_20\main.cpp(213): error C2143: syntax error: missing ',' before '{

 

Paper#69415 | Written in 18-Jul-2015

Price : $27
SiteLock