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

 
 


aien
ADT ,data structure (ArrayList), sorting
0 Answer(s)      2 years and 2 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..

View Answers









Related Pages:
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
ArrayList
as data is added. An ArrayList implements the List interface which allows... be used if the data structure is later changed. Iterator - Allows simple... Java Notes: ArrayList java.util.ArrayList allows for expandable arrays
ArrayList
as data is added. An ArrayList implements the List interface which allows... be used if the data structure is later changed. Iterator - Allows simple... Java Notes: ArrayList java.util.ArrayList allows for expandable arrays
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
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
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
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
ArrayList (non-generic)
))); } Sorting If the data in your ArrayList has a natural sorting order (ie... expands as data is added. Access to any element of an ArrayList is O(1... to a LinkedList structure. ListIterator - Allows traversal of the ArrayList
sorting and storing data
sorting and storing data   sorting and storing data in UITableView
Collections (Data Structure Library)
Collections (Data Structure Library) Predefined Libraries Standard data-structure solutions. Similar to C++ Standard Template Library. Don't... Manipulate data structures (sorting, searching, ...). All classes
ArrayList<E>
If the data in your ArrayList has a natural sorting order (ie, implements Comparable... expands as data is added. Access to any element of an ArrayList is O(1). Insertions... of using a simple array or an ArrayList. If the data has a known number
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
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
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
group by sorting
group by sorting  group by sorting of data in SQL
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
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
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
What is Sorting in PHP
studied  in 'C' -language, Data structure using 'C'/'C++' etc. The following...What is sorting Sorting is a process of arranging the elements of an array...; printf("\n After sorting the values are:");     
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
Sorting the array
Sorting the array  Implement a program to process votes for 5 candidates in a talent contest. The program should use a String array to hold the names... int[] votes = new int[5]; //input data input(votes); } public
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
Java Sorting
VoteComparator()); for(Candidate data: list){ v...=""; Collections.sort(list,new VoteComparator()); for(Candidate data: list
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
Comparators
of comparators is to pass them to something that does sorting, either one of the explicit sort methods, or to a data structure than implicitly sorts (eg, TreeSet... can be used to create objects to pass to sort methods or sorting data structures
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
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
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
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
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
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
sorting
sorting   write a program to arrange sorting in rows,column and diagonal
Sorting algorithms - Java Beginners
Sorting algorithms  I'v being given an assignment and I still couldn't find a proper answer for the following questions.Can anyone pls pls help me wi... for different data types(like char and int) and sizes of inputs. Thanks a lot
Alphabetically sorting order
Alphabetically sorting order  Write a java program that takes a list of words from the command line and prints out the arguments in an alphabetically...(st); } System.out.println("ArrayList Elements in Sorted order
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
Sorting
Sorting  can any help me know which sorting algorithm java uses for sorting collection and arrays
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 to a program to arrange the sorting in rows, column and digonal
Comparators
of comparators is to pass them to something that does sorting, either one of the explicit sort methods, or to a data structure than implicitly sorts (eg, TreeSet... can be used to create objects to pass to sort methods or sorting data structures
sorting
sorting  how to do sorting without using bubble sort,selection sort
Sorting Arrays
computer science topic it sorting, putting a collection of data in some order..., ArrayList), and there are data structures such as TreeMap that keep elements... in unusual cases. Other data structures. There are sort methods
mysqldump structure only
mysqldump structure only  Hi, How to take dump of database structure only? Provide me the syntax to take mysqldump structure only. Thanks   Hi, You can use -d option with mysqldump command to take the structure only
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
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
table structure - Ajax
; import javax.servlet.http.HttpServletResponse; public class Data extends

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.