contain the array of struct Employee and proper operations on it. Choose array size to be 30. 4. Program must run successfully on empty file, file with more than 30 Employees, and less than 30. Keep employee array size to 30. In each case program must inform user properly. For example, if file has data more than the capacity of the array then user must be informed that file has excess data and only 30 employees would be processed. Suggestions for member and non-member function Design: 1. Provide get and set member functions for all necessary private data members. 2. Provide member function to calculate gross salary and required error correction. 3. Provide a struct member function that prints the employee data either to a file or to the standard output. The output is properly formatted. If employee gross salary was set to zero then function prints relevant message that there were calculation error due to bad file data. 4. Provide functions for sorting and searching based on different criteria.
contain the array of struct Employee and proper operations on it. Choose array size to be 30. 4. Program must run successfully on empty file, file with more than 30 Employees, and less than 30. Keep employee array size to 30. In each case program must inform user properly. For example, if file has data more than the capacity of the array then user must be informed that file has excess data and only 30 employees would be processed. Suggestions for member and non-member function Design: 1. Provide get and set member functions for all necessary private data members. 2. Provide member function to calculate gross salary and required error correction. 3. Provide a struct member function that prints the employee data either to a file or to the standard output. The output is properly formatted. If employee gross salary was set to zero then function prints relevant message that there were calculation error due to bad file data. 4. Provide functions for sorting and searching based on different criteria.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
Step 1
Here's a simple application, ArrayDemo (in a.java source file), that produces an array, fills it with values, and displays them.
public class ArrayDemo {
public static void main(String[] args) {
int[] anArray; // declare an array of integers
anArray = new int[10]; // create an array of integers
// assign a value to each array element and print
for (int i = 0; i < anArray.length; i++) {
anArray[i] = i;
System.out.print(anArray[i] + " ");
}
System.out.println();
}
}
The output from this program is:
0 1 2 3 4 5 6 7 8 9
- Declaring a Variable as An Array Reference
- Accessing an Array Element
- Getting the Size of an Array
- Creating an Array
- Array Initializers
Trending now
This is a popular solution!
Step by step
Solved in 6 steps
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education