Create a new test02 class

Assignment Help Database Management System
Reference no: EM13336777

Creating your base classes

Create a new project in Eclipse called Assignment 1.

Within this project create a package called task02.

1. Authortwo new classes within your newly created package. Choose two related real world objects (similar to the Person and Car objects in the sample code provided) that you are modelling where one object might own or use or provide a service to the other object. e.g. a Person might own a Pet, a library might own a Book, a Person might hire a Video, a Teacher might teach a Student, a Coach might train an Athlete, a Dentist might treat a Patientetc.Due to this relationship, one of your objects will have a reference to the other object (similar to the Person having a Car).

2. Descriptions of each class and Class diagramsmust be entered into your document created in task1. List any assumptions you make. Describe the relationship between the classes.

3. Explain the methods that you have authored - provide a description and type of any parameters and describe the purpose for each method.

4. Give an example of output that would be produced by your method/s.

5. Explain the constructors that you have provided. You must provide at least 2 constructors:

a. A no-parameter constructor which assigns each instance variable a default value. The String variables (e.g. name) should be initialised to "unknown", and object fields initialised to null.

b. A constructor with parameters which assigns values to each instance variable. Note that the values to initialise the fields and objects should be passed in using argumentswhen the constructor is called - the fields should not be instantiated in the constructor.

6. Write get and set methods for your classes for each instance variable.

7. Write a toString method that will return a String containing all the relevant data for each of your objects.

8. Create a new Test02 class. In this class, provide a main method containing code to test both constructors, at least one get and one set method and your toString method.Run your test and make sure your class is behaving correctly.

9. In your documentation, explain how you have tested your code and the results of your testing. Include screen shots demonstrating the output when you tested your code.

Reference no: EM13336777

Questions Cloud

What is the accelertation of the object : Two forces act on a 6.5 kg object sitting on friction-less horizontal surface and force is 25N in the(+) x-direction and the other is 35N in the (-)x-direction. What is the accelertation of the object
Explain new objects based on extending other objects : One of the new classes must be based on a reference extending an existing class from package task02 directly(similar to how Customer extends Person in the sample code).Do not repeat that package task02 class in the task03 package.
Explain the ph of a solution prepared by mixing : What is the pH of a solution prepared by mixing 100 ml of 0.0500 M HCL with 300ml of 0.500 M HF? Ka(HF) = 7.1 x 10^-4
What is the acceleration of the hanging mass : A hanging mass and the cylindrical, uniform, frictionless pullery have mass M. What is the acceleration of the hanging mass
Create a new test02 class : Write a toString method that will return a String containing all the relevant data for each of your objects.
Explain calcium chloride will a precipitate form : If 4.00 mL of 0.200 M NaOH are added to 1L of 0.100m Calcium chloride will a precipitate form. What about 20mL
How much work was done on the box : An 880 N box is pushed across a level floor for a distance of 5.0m with a force of 440N. How much work was done on the box
Predict the ratio qa by qb from two different patients : Blood from two different patients is to be tested by having it glow through a long straight tube of length 10 cm and internal diameter 6 mm. A pressure drop of 50 dynes/cm2 is imposed from one end of the tube
What is the recoil velocity of the cannon : A 120 kg cannon shoots a 0.5 kg ball with a velocity of 80.0 m/s. What is the recoil velocity of the cannon

Reviews

Write a Review

Database Management System Questions & Answers

  Find out which data from database to archive

Find out which data from database to archive; that is, for each table, Write down whether data requires to be archived.

  Discuss how olap and data warehousing technologies

Discuss how OLAP and data warehousing technologies work together in solving user problems. What are the advantages and disadvantages of the different OLAP technologies (MOLAP, ROLAP, HOLAP)?

  Characteristics of database

Describe the database and describe the four characteristics of the database? Explain the Relational Database and generate a relational database for five employees.

  Developing a database

You have been asked to develop a database utilizing only the written problem description given by the client. In reviewing the description.

  Explain what information is available in relational database

Explain what information is available from relational database containing one relation with attributes Name, Employee identification number, and Address which is not available.

  Advantage storing metadata in tables

What advantage is there in storing metadata in tables? Is Microsoft Access a DBMS? Why or why not? List the several consequences of a poorly designed database.

  Use the prime_minister database

Use the prime_minister database (prime_minister.sql) from the Interact Resources site. Answer the following queries from that database.

  Ways of implementing one-to-one relationships

Describe the difference ways of implementing one-to-one relationships. Assume you are maintaining information on offices (office numbers, building, and phone numbers)

  Draw a diagram 0 dfd for the order system

Draw a decision tree that describes the merchandise inventory management process.

  Build an uml model in microsoft visio

Neatness of your diagram, please use the concepts of model, package, and sub-system well in the Visio model. Create both your diagrams under the static model from the model explorer in Visio.

  Determine a list of n numbers has no duplicates

Express given five loosely described problems carefully in { Instance, Question } form as utilized in "Computers and Intractability". Determine that a list of n numbers has no duplicates.

  Explain turing and von neumann models

Write a 2 page research paper (excluding the title page) on the Turing and von Neumann models. Compare and contrast each and discuss which model is better and why.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd