Code Monkey home page Code Monkey logo

splab2's Introduction

SPLab2: Employee Database Management Program

Building and Running the Program

This is a simple Employee Database Management Program implemented in C. This guide will walk you through the process of building and running the program.

Prerequisites

Before you can build and run the program, you need to have a C compiler installed on your system. The GNU Compiler Collection (GCC) is a popular choice and is available on most systems.

Building the Program

First, ensure all source code files are located in the same directory. Then, open your terminal or command prompt, navigate to this directory, and execute the following command to compile the program:

clang database.c readfile.c -o main

Feel free to replace main with any name you prefer for the executable.

Compilation

After compilation, run the program by providing a data file as a command-line argument:

./main input.txt

Feel free to replace "input.txt" with any file you prefer for the input.

Program Menu

The program menu offers the following options:

  1. Print the Database: Displays a table of all employees in the database, including their first name, last name, salary, and employee ID.
  2. Lookup by ID: Search for an employee by their Employee ID.
  3. Lookup by Last Name: Searches for an employee by their last name.
  4. Add an Employee: Allows you to add a new employee to the database by providing their first name, last name, and salary.
  5. Quit: Exits the program.
  6. Remove an employee: Allows you to delete an employee from the database.
  7. Update an employee's information: Enables you to update the employee's information.
  8. Print the M employees with the highest salaries: Print the top Mth salary, sorted by salary.
  9. Find all employees with matching last name: Return information for every employee whose last name matches case-insensitively.

splab2's People

Contributors

readmyname95 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.