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

  Illustrate concurrency control method by two phase locking

For each table argue whether or not interference with another transaction is possible. Illustrate concurrency control method using two phase locking.

  A county wishes to create a database

A county wishes to create a database to control its local libraries. Each library has a number of employees, one of whom is designated as the manager of the library and is responsible for supervising employees and the general day-to-day management..

  Create a relational database schema for this model assuming

Consider the EER diagram for a car dealer in the figure below. Map the EER schema into a set of relations.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Explain the importance of electronic software application

Write clearly and concisely about topics related to information systems for decision making using proper writing mechanics and technical style conventions.

  Draw a diagram 0 dfd for the order system

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

  Define calculations and format the table

internship at Mountain View Realty, a real estate firm that focuses in the North Utah County area. The previous intern developed a spreadsheet listing houses listed and sold during the last several months. She included addresses, location, list pr..

  List all the functional dependencies present in the relation

You must implement the entity relationship model provided in the model solution to Assignment 1. The model solution will be released on the course website approximately TWO (2) weeks after the Assignment 1 due date.

  Create link list in adt to maintain employee information

Create a link list in ADT c to maintain employee information like name,empid,basic salary and address.1.add employee info to the list if the empid is valid.

  Create mock-up report to make the monthly claim

He wishes you to group data by insurance company number, with subtotals by company and grand totals for each numeric field.

  Recognize input data required for each of processes

Recognize input data required for each of processes. Recognize logical name for each data output item and kind of data output (real number, integer, text).

  Prepare a database design specification

Understand and interpret a set of business rules for a database and create an Enhanced Entity Relationship Diagram that models the requirements accurately

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