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

  Transform the tables into one or more tables in bcnf

Transform the tables into one or more tables in BCNF. State the primary keys, candidate keys, and referential integrity constraints.

  Creates a database named personnel

Write an application that creates a database named Personnel. The database should have a table named Employee, with columns for employee ID, named position, and hourly pay rate.

  What are the main activities that the business undertakes

What are the main activities that the business undertakes and where in the business are the crucial decisions made?

  Define the term use case

Explain the difference between the > and > relationships in use case diagrams?

  A university library database records

A university library database records information about books; for each book, it records the book isbn number (which is unique), and the book name. In addition, it records which books have been checked out

  Explain evaluating a proposal for acquisition and sourcing

When evaluating a proposal for acquisition and sourcing, are there considerations that are unique in the case of an IT project versus a non-IT project

  Find maximum salary of employees from database table

Find the maximum salary of all employees who are not managers. Give all the managers in the database a 10 percent salary raise. Give all the other employees a 5 percent salary raise.

  Indicate change to make original premiere products database

Indicate the changes (using the shorthand representation) that you would need to make to the original premiere products database desing to support the following requirements.

  Review of object oriented software development methodologies

Analyze how the verify method can be used to plan out system effectively and ensure that the number of transactions do not produce record-level locking while the database is in operation.

  Dimensions and attributes in a star schema model

Explain the use of facts, dimensions and attributes in a star schema model. Explain the use of facts, dimensions and attributes in a star schema model.

  Create an actual web page document

Modify the XML document in Exercise 2 to include a namespace URL from which the elements of the XML document in Exercise 3 will be associated with. Make any changes to the XML document that are necessary as a result of the namespace URL inclusion.

  Design a database - what is the purpose of your database

Design a database, a database planner should spend a considerable amount of time thinking about what kind of information will be included in the database and how it will be organized.

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