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



Home Answers Viewqa Java-Beginners JAVA: Recusrion, Binary Search
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Chelsea
JAVA: Recusrion, Binary Search
0 Answer(s)      3 years and 5 months ago
Posted in : Java Beginners


I want to learn about Binary Search and Recursion but I'm confused on how to do it. I know that I also need arrays, Inheritance, Interface, etc for this program. I also know that this needs to be implemented into a lot of classes. So if you could figure out this program for me that would be great.

You will design the administration program for a veterinary office: This office attends to three different kinds of animals: Dogs, Birds, and Fish. You are to capture these with their respective classes. Each subclass of animals will have 5 different varieties. You are to define what those are for each kind of animal.

You should keep track, for every animal, the following information:

  • Owner.
  • Name of the animal.
  • Age of the animal.
  • Medical history: A list of diseases,and a status for each: current or past.
  • A list of vaccinations, if applicable.
  • Current appointments.

Appointments are their own entity, so this should captured with a class, containing date and time, and client.

You should also have a class for owners with information like name, address, and phone number.

Here's the functionality you must provide:

  • See a list of all appointments, and change the status from outstanding to resolved. When an appointment is resolved, it is removed from the list.
  • Search appointments by owner and by date.
  • Search medical records by animal name, owner, and animal kind (like show all appointments for Dogs).
  • From the screen of the record of a particular animal, check appointments, and add appointments.
  • The whole registry can be saved and restored to/from a file.

For all the search functionalities you are to implement it using a recursive implementation of Binary Search. For the cases when more than one result can be returned, modify Binary Search to return all the elements satifying the criteria (instead of the first it finds). This modified version should still run in logarithmic time.

Bonus: provide a GUI interface. (You do not have to do this part if you do not want to I just thought it might be fun for whoever does this to code)

Let me know if you have any more questions regarding this program


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Binary Search - Java Beginners
Binary Search  how to use Binary think in java give me the Binary Search programm thx
binary search program
binary search program  write a program to searching a string using binary search
Advertisements
binary search program
binary search program  write a program to searching a string using binary search
binary search program
binary search program  write a program to searching a string using binary search
binary search program
binary search program  write a program to searching a string using binary search
binary search program
binary search program  write a program to searching a string using binary search
Binary Search on array
Binary Search on array  What requirement is placed on an array, so that binary search may be used to locate an entry? ? The array elements must form a heap. ? The array must have at least 2 entries. ? The array must
binary search tree
binary search tree  Construct a binary search tree by inserting the following sequence of characters into an empty tree. N O N L I N E A R D A T... for each algorithm. get an item from the user and search the level/levels
binary search tree
binary search tree  Construct a binary search tree by inserting words into an empty tree. "cut your coat according to your cloth" Visit the tree.... get a word from the user and search the level/levels of that word. refer split
JAVA: Recusrion, Binary Search
JAVA: Recusrion, Binary Search  I want to learn about Binary Search... it using a recursive implementation of Binary Search. For the cases when more than one result can be returned, modify Binary Search to return all the elements
Binary Search Tree
Binary Search Tree  Question-1 ) Modify the BinarySearchTree class so that the iterators are fail-fast.Test your class with amain method ? Question-2 ) Modify the BinarySearchTree class so that the BinarySearchTree objects
Binary Search Tree
Binary Search Tree  Question-1 ) Modify the BinarySearchTree class so that the iterators are fail-fast.Test your class with amain method ? Question-2 ) Modify the BinarySearchTree class so that the BinarySearchTree objects
binary search - Java Beginners
binary search  Write a java program to search an array by using recursive binary search.  /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package
Binary Search!!! - Java Beginners
Binary Search!!!  Hi Sir, My question is quite simple. im only... = Integer.parseInt(searchKeyText); position = search(searchKey, arrayList, 0... to continue?"); } } public static int search(int target, int
binary search tree
binary search tree  how can i make binary search tree? i want write a code that make dictionary with binary search tree data structure.please help me...){ IsEmpty(); currentNode = find(root, number); System.out.println("Search
JavaScript Array Binary Search
JavaScript Array Binary Search       The JavaScript Binary Search becomes very useful in case of large Arrays.  The Binary Search algorithm is used to  handle
Binary search tree (insertion) urgent!!
Binary search tree (insertion) urgent!!  Create a program to construct a binary search tree consisting of nodes that each stores an integer.... Assume a binary search tree is constructed from the values 14, 35, 2, 3, 39
Binary Search in Java
Binary Search in Java In this section, we are going to search an element from an array using Binary Search. The advantage of a binary search over a linear search is astounding for large numbers. It can be done either recursively
Which of the following statements are true with respect to binary search
Which of the following statements are true with respect to binary search  Which of the following statements are true with respect to binary search? 1. The array need not be sorted for carrying out binary search 2. Binary search
How to using Binary Search Array Java ?
How to using Binary Search Array Java ?  Hi, I am beginners in Java... functions. The problem is that how to use binary search array in Java. Please give any online reference show that i will implement the binary search array in Java
php array binary search
PHP Binary Search Array is used to search the given value in the array. In php there is no function for the binary search like java or other language. User can implement and use the binary search in php as given below
Java Array Binary Search example
Java Array Binary Search It is a method for searching the array element... the binary search algorithm.  It returns the index of the found element... example demonstrates how to do a binary search on the Java array object
binary search tree from text file
binary search tree from text file  How so I go about constructing a binary search tree from a text file, which has letters and numbers, which must be sorted and printed in ascending order. E.g. Text file contents 3 apples pears
Send me Binary Search - Java Beginners
Send me Binary Search  how to use Binary think in java give me the Binary Search programm thx..  Hi friend, import java.io.*; public class BinarySearchDemo { public static final int NOT_FOUND = -1
Binary Search in Java
Binary Search in Java is used to search an element from an array. Programmers opt for Binary search over linear search when it comes to large numbers. It can... the answer "Not Found". Following is the example of Binary Search in Java: import
How to create binary search tree using an array?
How to create binary search tree using an array?  hello people, pls guide me on the topic above. i have an string array, i want to make a binary search tree based on data inside this array. the array contains names of people
binary
binary  Hi I want to write a program in pascal that ask a user to input a decimal number and then return its binary equivalent in the minimum number of bits required to repesent the number. Thks
search
search  how to develop search box and how to retrive data from database..   Please visit the following link: Search box
SEARCH
SEARCH  how can we do search in jsp...? option for search criteria like name and DOB...   Please visit the following links: http://www.roseindia.net/jsp/user-search.shtml http://www.roseindia.net/servlets/search.shtml
Binary tree
Binary tree  a. Construct a method to implement a binary tree using an array. b. Implement the binary tree to store numbers in sorted order
Search
Search   Hi, I have a project in which I am trying to enter "Marathi" (Indian local language) data in JSP using JSTL and trying to search data... and tries to search then It shows no data from database
 

 

 

DMCA.com