14 Aug Java Help
1) Write a recursive function for generating a basic, infinite geometric series. As an example, from n = 1 to 4, it should generate the sum: 1/2 + 1/4 + 1/8 + 1/16.
Ensure your method has a working base and general case and returns the above sum (as a double). It should take any n greater than 0 as an input.
2) Trace the function you wrote above for input n = 5. (Refer to lecture notes for a trace reference, specifically the factorial example)
3) Overwrite the paintComponent method below, with the following constraints. If a string field called shape, which you have access to, has the value “Square,” fill a red square that goes from point (50,100) to point (150,200). If the field has the value “Circle,” draw a blue oval that goes from point (200,200) to point (400,400).
public void paintComponent(Graphics g){
4) You have been asked to write an application to help manage a pet store. Below are a list of requirements that the pet store have, as well as constraints that your client (i.e me) has specified for any software developed.
· Object Serialization should be used to save data (originally this was not going to be on the exam, but it is an easy way to save data, so I included it)
· The pet store must service at least three regular kinds of pets (e.g dog, cat, guinea pig), with a total of five pets served (the other two don’t have to be “regular”)
· The pet store interface must feature a GUI with a list of current animals for sale. Each animal for sale should specify the animal’s name, species, and any other pertinent details:
· Example: Charlie the Cat is 5 years old. He has black fur.
· All Pets must belong to an inheritance hierarchy of some kind. An easy way to do this is to make a Pet class from which all kinds of Pets inherit
· The GUI must support the following operations
· Load Inventory – load a file of pet data to display in the store (let the user specify a file name)
· Save Inventory – save the current petstore data to a file (let the user specify a file name)
· Add a pet – Prompt the user for information to add a pet to the list of pets
· Sell a pet – Sell the pet currently selected in a JList on a GUI
· It is suggested saving and loading inventory go into a File menu
· The application should use polymorphism – that is, all lists should be lists of Pets (or Animals or whatever you call the class), rather than a list of type Dog, Cat, etc.
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.
