Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners ADT ,data structure (ArrayList), sorting
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


aien
ADT ,data structure (ArrayList), sorting
0 Answer(s)      3 years and 9 months ago
Posted in : Java Beginners


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..


Advertisement
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 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
Advertisements
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
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
sorting and storing data
sorting and storing data   sorting and storing data in UITableView
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
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
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
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
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
sorting
sorting   write a program to arrange sorting in rows,column and diagonal
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
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
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
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
sorting
sorting  how to do sorting without using bubble sort,selection sort
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
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
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
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
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
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
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
group by sorting
group by sorting  group by sorting of data in SQL
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
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 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
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
 

 

 

DMCA.com