ADT ,data structure (ArrayList), sorting

ADT ,data structure (ArrayList), sorting

Write a program to calculate a bonus for 10 employees of WAFA Supermarket. The program consists of an abstract class Employee. Each employee contains IC number, name, basicSalary, noOfYearService, set methods for each attributes and an abstract method calculateBonus(). Cashier and Supervisor are the subclasses of Employee class. Both subclasses contain bonus attribute and method calculateBonus(). Bonus for a supervisor is calculated by basicSalary * 25% *noOfYearService while bonus for a cashier is basic salary * 15% *(noOfYearService/2).

Store each employee information in different arrayList depending on his/her position (cashier or supervisor).

The program displays a menu with choices ( 1. to add employee information, 2. to delete employee, 3. to display report). Below is a sample format of a report when a user chooses to display a report..

can help me to identify what set methods that should have in this program..and can help me..give some clue in coding..how to start this program..

View Answers









Related Tutorials/Questions & Answers:
ADT ,data structure (ArrayList), sorting
ADT ,data structure (ArrayList), sorting  Write a program to calculate a bonus for 10 employees of WAFA Supermarket. The program consists... in different arrayList depending on his/her position (cashier or supervisor
Sorting arraylist without using Collection.sort()
Sorting arraylist without using Collection.sort()  Hi, How can I sort an arraylist without using Collection.sort() nad also I am not allowed to use any other data structure in the program? Is there any algorithm by using which I
Advertisements
Sorting an ArrayList
Sorting an ArrayList  print("code sample");Hello All, I am working on a program for school and I am having trouble with sorting my list. The numbers I receive in my output are correct, but not in ascending order as required
sorting and storing data
sorting and storing data   sorting and storing data in UITableView
Data structure
Data structure: How to sort numbers in a queue using a bubble sort method?  How to sort numbers in a queue using a bubble sort method
data science course structure
data science course structure  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: data science course structure Try to provide me good examples or tutorials links so
to read data stored in ArrayList - Struts
to read data stored in ArrayList  this is regarding struts2, i have create one ArrayList object and in that i have stored 4 User class objects taking them from database. Now i want to read the data of all 4 User objects from jsp
sorting
sorting   write a program to arrange sorting in rows,column and diagonal
Sorting
Sorting  can any help me know which sorting algorithm java uses for sorting collection and arrays
sorting
sorting  write to a program to arrange the sorting in rows, column and digonal
extracting column and sorting csv data alphabetically
extracting column and sorting csv data alphabetically  hi here is my code and csv data save it as country.csv file *Australia;AU;1.5 Thaialnd;TH;1.6 India;IN;1.7 Malaysia;ML;1.8 Japan;JP;1.9 Korea;KO;1.10 Bangladesh;BD;1.11
array ADT
array ADT  Write a program using array_ADT to retrieve a list of elements from a file
array ADT
array ADT  Write a program using array_ADT to retrieve a list of elements from a file
How to Display Data in a tree structure on the GUI
How to Display Data in a tree structure on the GUI  how to display data in a tree structure on the GUI? I need this sort of UI to display data showing a set of rules showing various conditions and the actions related
sorting
sorting  how to do sorting without using bubble sort,selection sort
Sorting data in a jsp using a servlet while implementing comparable - JSP-Servlet
Sorting data in a jsp using a servlet while implementing comparable  ... BookManagementForm { private ArrayList books; private Book currentBook; private ArrayList errorMsg; public ArrayList getBooks() { return books; } public void setBooks
Managing Multiple User Input Data in an Array (or ArrayList)
Managing Multiple User Input Data in an Array (or ArrayList)  Hey... record alphabetically (2) If user chooses choice1, the input data is stored in an ARRAY (or ARRAYLIST) until the user chooses to stop inputting data. Kindly
array ADT
array ADT  Write a program using array_ADT to retrieve a list of URLs from a file. In your program take an array index as the input and delete the entry corresponding to that index
Tree data structure
Description: A tree data structure that are based on hierarchical tree structure with sets of nodes. A tree is a acyclic connected graph with zero or more...; #include <stdlib.h> struct node { int data; struct node *lchild
java data structure - Development process
java data structure  what is the minimum no of nodes for AVL tree whose height h=15? pls let me know the answer.  Hi Friend, Minimum node of nodes in AVL tree is equal to its height. Thanks
group by sorting
group by sorting  group by sorting of data in SQL
which data structure is good in java..? - Java Beginners
which data structure is good in java..?  Hi frends, Actually i want to store and retrieve some data using data structures like array list, stack... and retrieve the data among all these techniques of data structures.........can
arraylist of an arraylist
arraylist of an arraylist  Can anyone suggest me how to use arraylist of an arraylist?? how to put data into it and get data from it???? becoz i want to make rows and column dynamic which can grow as per requirement?????/ plz
sorting and filtering the displayed table data using jsp and xml
sorting and filtering the displayed table data using jsp and xml  I have created a xml file and a jsp file, which uses DOM parser to display the content of xml file in web page. Now I would like to sort and filter those data
arraylist
arraylist  Hi how can we eliminet duplicate element from arraylist in java? how can we achieve data abstrcation and encapulation in java? how many type of modifier are there in java? Thanks kalins anik   Remove
arraylist
arraylist  Hi How can we eliminet duplicate element from arraylist? How can we find highest salary from arraylist ? How can we highest key value pair from map? Thanks Kalins Naik   Remove duplicates from Arraylist
arraylist
arraylist   Using arraylist class , what type of exception are throws, how can write a java programe   An ArrayList can throw... ArraylistException { void buildAlphabet() { ArrayList list = new ArrayList
ModuleNotFoundError: No module named 'adt'
ModuleNotFoundError: No module named 'adt'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'adt' How to remove the ModuleNotFoundError: No module named 'adt' error
arraylist
data into an arraylist and display the data of the particular employee according...arraylist  Hi i have class A , i have added employee name and id in arraylist, then how can i find out all infomation of class A using emplyee
Linear and Non-Linear Data Structure in C
Linear Data Structure: Linear data structure is linear if element is adjacent... as its previous and next member. Example of Linear Data Structure Array Linked List Stack Queue Non- Linear Data Structure Non-Linear data
ADT stack - Java Beginners
ADT stack  I want a algorithm for the below programs.... 1)Implement...]. 2)Design a Java interface for ADT Stack. Develop two different classes...; } public static void main(String[] args) { List l=new ArrayList(); l.add(3
ArrayList
ArrayList  import java.util.*; class ArrayListDemo2 { public static void main(String args[]) { ArrayList al=new ArrayList(); al.add("one"); al.add("two"); al.add("three"); al.add("four"); for(int i=0;i Expected
Java Stack ADT
Java Stack ADT You all are familiar with the data structure 'Stack'. The Stack ADT is same as Stack. It is a LIFO data structure where insertions... the only element that can be inspected. Here we have designed a Java interface for ADT
Is there a data structure like a class that doesn't need to be defined as a class in it's own file?
Is there a data structure like a class that doesn't need to be defined... another charge. However, I recall once seeing a data structure that one could create... simply make one ArrayList that included each variable I need. Does such a data
How Can I get ArrayList of Data from jsp with ajax request
How Can I get ArrayList of Data from jsp with ajax request  Hi, I retereved 5 Employee Record of Data from Struts Action class to jsp with ajax response. But I don't how how can reterve this dynamic 5 employee records
arraylist
% *(noOfYearService/2). Store each employee information in different arrayList depending on his
Sorting in Java
Sorting in Java  Sorting in Java
ModuleNotFoundError: No module named 'adt-extension'
ModuleNotFoundError: No module named 'adt-extension'  Hi, My... 'adt-extension' How to remove the ModuleNotFoundError: No module named 'adt-extension' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'adt-package'
ModuleNotFoundError: No module named 'adt-package'  Hi, My Python... 'adt-package' How to remove the ModuleNotFoundError: No module named 'adt-package' error? Thanks   Hi, In your python environment
ADT stack - Java Beginners
ADT stack  Design a Java interface for ADT Stack. Develop two different classes that implement this interface, one using array and the other using....  Hi Friend, Try the following codes: ADT Stack: import
ArrayList object
ArrayList object  i have am ArrayList object it containg data base records in it, now i want to display this ArrayList object data in my jsp programe, plz help me
Java ArrayList Example
demonstrates you the use of ArrayList. An ArrayList is a data structure. It can...Java ArrayList Example  How can we use array list in java program..."); array.add("Arun"); System.out.println("ArrayList Size
arraylist not able to store large amount of data( over 1 lakh records) - Java Interview Questions
arraylist not able to store large amount of data( over 1 lakh records) ... function that iterator is used to iterate and data from above arraylist is used... and also though the feature of arraylist is to expand itself with extra incoming data
Sorting in java - Java Beginners
Sorting in java  Hello.. I want you to help me with this question... is the best ADT to represent families recorded? and write the corresponding element of this ADT. b. Write the implementation for the most frequently operations: i
In data structure in java how to parse the given string and counts the member of character that match the given data?
In data structure in java how to parse the given string and counts the member of character that match the given data?  Design a parser that parse the given string and counts the member of character that match the given data.using
Spark Data Structure
Spark Data Structure - Data Structure types in Apache Spark Understanding... it with many examples. Spark Data Structure Apache Spark Framework provides... of Spark Framework. RDD is immutable data structure that distributes the data
how to pass arraylist data from one jsp to another jsp - JSP-Servlet
how to pass arraylist data from one jsp to another jsp  hi to all iam not able to pass the data which is stroed in arraylist, actually i need to receive all employee id's that are retrived from the database in the first jsp
SORTING - Java Interview Questions
SORTING  HOW to sort the intger elemnts only in arraylist?  ...{ public static void main(String args[]) { ArrayList list= new ArrayList...("Items after sorting are ="+list); } } Thanks
How to obtain the selected data item from a list box when listbox contains objects wrapped under Arraylist?
page. The listbox gets populated by the data contained in the arraylist. Now, I...How to obtain the selected data item from a list box when listbox contains objects wrapped under Arraylist?  I have a jsp page containing a list box
Sorting and Searching
Sorting and Searching  Hi i would really be thankful if someone could... programming language using a number in the range 0 - 10. The data input is ended... average - no data"); catch(IOException

Ads