Write a java program using Encapsulation for the following class diagram. Get the values of name,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a java program using Encapsulation for the following class diagram. Get the values of name, id and 2 marks from the user using getvalues() function. Calculate the average of 2 marks inside average () function. Display name, id and average inside display() function. Use necessary Java class and Java main class. Create Java Main class with your name (3 Marks) Student +name: String #ID: int -m1: float -m2: float +average() +display() +getvalues() Write a java program using Encapsulation for the following class diagram. Get the values of name, id and 2 marks from the user using getvalues() function. Calculate the average of 2 marks inside average () function. Display name, id and average inside display() function. Use necessary Java class and Java main class. Create Java Main class with your name (3 Marks) Student +name: String #ID: int -m1: float -m2: float +average() +display() +getvalues()
Expert Answer:
Answer rating: 100% (QA)
The question is asking you to create a Java program that uses encapsulation to define a Student class as per the provided class diagram This includes ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Why does Esther say her disease is incurable and how does this relate to Plath's depiction of Esther's decline.
-
On January 1, Marshall Co. issued a $360,000, three-year, 6% installment note payable with payments of $134,680 principal and interest due on January 1 for each of the next three years. 1. needed the...
-
A car has an engine that consumes fuel at a rate of 20 liters per hour and produces 60 kW of power to drive the wheels. If the fuel has a heat capacity of 44,000 kJ/kg and a density (mass density) of...
-
2. The beam in the figure is made of material having modulus of elasticity E = 200 GPa . The moment of inertia of segments AB and CD of the beam is I = 6.77 10-6 m, while the moment of inertia of...
-
The products of ----------- are-----------cells. a. Mitois diploid b. Meiosis, haploid c. Meiosisdiplod d. Both a and b are correct
-
High-profile vehicles have poor fuel efficiency because of increased wind resistance from their large front area. A number of companies make devices that they claim will significantly increase a...
-
How valuable is computer knowledge to a forensic accountant?
-
Track Town Co. had the following transactions involving intangible assets : Jan. 1 Purchased a patent for leather soles for $10,000 and estimated its useful life to be 10 years. Apr. 1 Purchased a...
-
Use the following information for the next six items: Yanagida Energy Resources Corporation (YERC) is registered in the Philippine Securities and Exchange Commission (SEC) on July 6. 1092. It is...
-
Finnegan and Healey form a partnership, contributing $35,000 and $105,000, respectively. Determine their shares of net income or net loss for each of the following independent situations: a. Net loss...
-
On August 31st, Old City Furniture acquired a new edge bander from IntraWood Machinery. Dennis Campbell, Old City's owner, paid $60,000 in cash and had a 5% note for $115,000. Following the purchase,...
-
Considering the articles "Biden closes gap on Trump but third-party candidates pose danger, polls show" published by the Guadian . What information do the articles provide on the sample that was...
-
You find Stock XYZ to have an expected return of 13% and a beta of 1.5. The market risk premium is 8%. If the CAPM is true, what is the risk-free rate?
-
Now, you understand how much firms around the world are interconnected with each other and how complicated it is to manage their supply chains. Unfortunately, the Covid-19 outbreak is currently...
-
What role does technological integration and automation play in streamlining workflows and reducing variability, thereby fostering greater consistency in product quality, service delivery, and...
-
Stock XYZ has an alpha of 1%, a beta of 1.1, and a residual standard deviation of 0.19. The market return is 8% and has a standard deviation of 16%. What is the correlation of the market and Stock...
-
Question 1: A steel company has three mills, M1, M2, and M3, which can produce 40, 10, and 20 kilotons of steel each year. Three customers, C1, C2, and C3 have requirements of 12, 18, and 40 kilotons...
-
How can you tell from the vertex form y = a(x - h) 2 + k whether a quadratic function has no real zeros?
-
Write a program that produces ten random permutations of the numbers 1 to 10. To generate a random permutation, you need to fill an array with the numbers 1 to 10 so that no two entries of the array...
-
The following algorithm yields the season (Spring, Summer, Fall, or Winter) for a given month and day. If month is 1, 2, or 3, season = "Winter" Else if month is 4, 5, or 6, season = "Spring" Else if...
-
How would you modify the chart component in Section 10.4.3 to draw a vertical bar chart? (Careful: The y-values grow downward.)
-
What financial effect will result if the hospital does not work toward those goals?
-
If Elizabeth could earn a 17 percent return on an investment in Hoffman Company stock (or some other company), what would you advise her to do? Explain your reasoning.
-
Why do you think these questions were extremely difficult for Microsoft to answer as the company considered the development of the Windows XP version of Microsoft Windows as a potential capital...
Study smarter with the SolutionInn App