classes: Observe the given Java code properly and draw the class diagram and object diagram using...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
classes: Observe the given Java code properly and draw the class diagram and object diagram using both the public class student private int id=50989; private String name="xyz"; private teacher phone; student() { phone-new teacher(); } void print() { System.out.println(name); phone.display(); } public class teacher { private int phone; private String name; private double marks; void display() } System.out.println(phone);//f } void show() { System.out.println(id); print(); } classes: Observe the given Java code properly and draw the class diagram and object diagram using both the public class student private int id=50989; private String name="xyz"; private teacher phone; student() { phone-new teacher(); } void print() { System.out.println(name); phone.display(); } public class teacher { private int phone; private String name; private double marks; void display() } System.out.println(phone);//f } void show() { System.out.println(id); print(); }
Expert Answer:
Answer rating: 100% (QA)
Here is the class diagram for the given Java code student id int name String p... View the full answer
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Posted Date:
Students also viewed these programming questions
-
Declare and assign these variables as shown (all your code must appear in the body of the main method): String firstName = "Blueberry"; String lastName = "Strawberry"; In addition, declare and...
-
public class Class extends ClassA public classB ( ( Time left 0 0 : 1 2 : 0 3 int init = 1 0 ; super ( 4 0 ) ; O a . . The method super is not defined. b . . No values may be passed to super. O c . ....
-
Steam is generated in the boiler of a cogeneration plant at 600 psia and 800F at a rate of 18 lbm/s the plant is to produce power while meeting the process steam requirements for a certain industrial...
-
Consider the graphical solution of the Reddy Mikks model given in Figure 2.2. Identify the path of the simplex method and the basic and non-basic variables that define this path.
-
In July 2008, Brian, Dale, and Sandra Allen signed a contract with East Resources, Inc., concerning 148 acres of the Allens property. East wanted to develop and exploit the oil and gas resources...
-
Draw a document flowchart to depict each of the following situations. a. An individual from the marketing department of a wholesale company prepares five copies of a sales invoice, and each copy is...
-
1. a) Suppose you deposit $2500 each year for 20 years in a savings account paying 5% compounded annually. How much would the account contain after 20 years? How much of the FV did you actually...
-
For her daughter's university education, Carla Hackl has invested an inheritance in a fund paying 9.2% compounded quarterly. If ordinary annuity payments of $4750.00 per month are to be made out of...
-
Which of the blowing is an example of a compliance assurance engagement? A. Proving in-house training to senior management regarding applicable laws and regulations B. Proving an assessment of the...
-
If a machine had a cost of $6,400 with an accumulated depreciation of $650, what would be its book value?
-
What is the purpose of database normalization in a relational database?
-
The employer doesnt have to contribute to Social Security. Agree or disagree? Please explain.
-
Calculate the total cost of the machine given the following: List price ................................... $2,950 Cash discount ..................................8% Freight...
-
When you look at the 2010 annual report for Kelloggs Company at http://investor.kelloggs.com/annuals.cfm, do you think Kelloggs uses a voucher system?
-
Find the inductance per kilometer per phase. D 2 as Find inductences perkm per phase
-
Experiment: Tossing four coins Event: Getting three heads Identify the sample space of the probability experiment and determine the number of outcomes in the event. Draw a tree diagram when...
-
Write the output produced when the following method is passed each of the following lists: a. [10, 20, 30] b. [8, 2, 9, 7, 4] c. [-1, 3, 28, 17, 9, 33] public static void mystery2 (ArrayList list) {...
-
The actual Set interface in the java.util package has several methods that are beyond those implemented by our search tree in this chapter. Write a version of SearchTree that adds some or all of...
-
Write methods called min and max that return the smallest and largest values in the linked list, respectively. For example, if a variable called list stores [11, 7, 3, 42, 0, 14], the call of...
-
(a) The longitudinal data set "v4c" is in the vertical format; transform it into the horizontal format. (b) Transform the data set you obtained in part (a) back into the vertical format.
-
Perform some exploratory analysis on the DTS study described above. (a) Compute the mean and standard deviation of the HamD scores for the two treatment groups at each time point. (b) Treat repeated...
-
Plot the mean/SD of HIV knowledge of adolescent girls at baseline and three months post treatment stratified by treatment for the Sexual Health study.
Study smarter with the SolutionInn App