B.1) Shortly explain interface with your own words. B.2) Shortly explain abstract class with your own...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
B.1) Shortly explain interface with your own words. B.2) Shortly explain abstract class with your own words and What are two important differences between an abstract class and an actual class? What are the similarities? B.3) Shortly explain the popularity reason for the OOP. B.4) Shortly explain the has-a and is-a relationship. B.5) Shortly explain the No-parameter constructor behavior in java B.6) Shortly explain the differences between "this" and "super" in java. B.7) Shortly explain the unchecked and checked exceptions. B.8) Shortly explain the visibility kinds in Java. B.9) What will this program print according to Computer and Notebook implementation in the class? Computer comp[] = new Computer[3]; comp[0] = new Computer("Ace", "AMD", 8, 750, 3.5); comp[1] = new Notebook("Dell", "Intel", 4, 500, 2.2, 15.5, 7.5); comp[2] comp[1]; for (int i=0; i<comp.length; i++) { } System.out.println(comp[i].getRamSize()+"\n" + comp[i].toString()); B.10) Explain the effect of each valid statement in the following fragment. Indicate any invalid statements according to Computer and Notebook example which I give in the slides. Computer cl = new Computer(); Computer c2-new Computer("Ace", "AMD", 8.0, 500, 3.0); Computer c3 = new Notebook("Ace", "AMD", 4.0, 500, 3.0); Notebook c4 new Notebook("Bravo", "Intel", 4.0, 750, 3.0, 15.5, 5.5); System.out.println(c2.manufacturer + "," + c4.processor); System.out.println(c2.getDiskSize() + "," + c4.getRamSize()); System.out.println(c2.toString() + "\n" + c4.toString()); B.11) Correct each of the following statements that are incorrect, assuming that class PDGUI and class PDConsole UI implement interface PDUserInterface. a. PDGUI pl = new PDConsoleUI(); b. PDGUI p2 = new PDUserInterface(); c. PDUserInterface p3 = new PDUserInterface(); d. PDUserInterface p4 = new PDConsoleUI(); e. PDGUI p5 new PDUserInterface(); PDUserInterface p6 = p5; f. PDUserInterface p7; p7 = new PDConsoleUI(); Submit 1. Word file that includes an explanation for the answers B.1) Shortly explain interface with your own words. B.2) Shortly explain abstract class with your own words and What are two important differences between an abstract class and an actual class? What are the similarities? B.3) Shortly explain the popularity reason for the OOP. B.4) Shortly explain the has-a and is-a relationship. B.5) Shortly explain the No-parameter constructor behavior in java B.6) Shortly explain the differences between "this" and "super" in java. B.7) Shortly explain the unchecked and checked exceptions. B.8) Shortly explain the visibility kinds in Java. B.1) Shortly explain interface with your own words. B.2) Shortly explain abstract class with your own words and What are two important differences between an abstract class and an actual class? What are the similarities? B.3) Shortly explain the popularity reason for the OOP. B.4) Shortly explain the has-a and is-a relationship. B.5) Shortly explain the No-parameter constructor behavior in java B.6) Shortly explain the differences between "this" and "super" in java. B.7) Shortly explain the unchecked and checked exceptions. B.8) Shortly explain the visibility kinds in Java. B.9) What will this program print according to Computer and Notebook implementation in the class? Computer comp[] = new Computer[3]; comp[0] = new Computer("Ace", "AMD", 8, 750, 3.5); comp[1] = new Notebook("Dell", "Intel", 4, 500, 2.2, 15.5, 7.5); comp[2] comp[1]; for (int i=0; i<comp.length; i++) { } System.out.println(comp[i].getRamSize()+"\n" + comp[i].toString()); B.10) Explain the effect of each valid statement in the following fragment. Indicate any invalid statements according to Computer and Notebook example which I give in the slides. Computer cl = new Computer(); Computer c2-new Computer("Ace", "AMD", 8.0, 500, 3.0); Computer c3 = new Notebook("Ace", "AMD", 4.0, 500, 3.0); Notebook c4 new Notebook("Bravo", "Intel", 4.0, 750, 3.0, 15.5, 5.5); System.out.println(c2.manufacturer + "," + c4.processor); System.out.println(c2.getDiskSize() + "," + c4.getRamSize()); System.out.println(c2.toString() + "\n" + c4.toString()); B.9) What will this program print according to Computer and Notebook implementation in the class? Computer comp[] = new Computer[3]; comp[0] = new Computer("Ace", "AMD", 8, 750, 3.5); comp[1] = new Notebook("Dell", "Intel", 4, 500, 2.2, 15.5, 7.5); comp[2] comp[1]; for (int i=0; i<comp.length; i++) { } System.out.println(comp[i].getRamSize()+"\n" + comp[i].toString()); B.10) Explain the effect of each valid statement in the following fragment. Indicate any invalid statements according to Computer and Notebook example which I give in the slides. Computer cl = new Computer(); Computer c2-new Computer("Ace", "AMD", 8.0, 500, 3.0); Computer c3 = new Notebook("Ace", "AMD", 4.0, 500, 3.0); Notebook c4 new Notebook("Bravo", "Intel", 4.0, 750, 3.0, 15.5, 5.5); System.out.println(c2.manufacturer + "," + c4.processor); System.out.println(c2.getDiskSize() + "," + c4.getRamSize()); System.out.println(c2.toString() + "\n" + c4.toString()); B.11) Correct each of the following statements that are incorrect, assuming that class PDGUI and class PDConsole UI implement interface PDUserInterface. a. PDGUI pl = new PDConsoleUI(); b. PDGUI p2 = new PDUserInterface(); c. PDUserInterface p3 = new PDUserInterface(); d. PDUserInterface p4 = new PDConsoleUI(); e. PDGUI p5 new PDUserInterface(); PDUserInterface p6 = p5; f. PDUserInterface p7; p7 = new PDConsoleUI(); Submit 1. Word file that includes an explanation for the answers B.11) Correct each of the following statements that are incorrect, assuming that class PDGUI and class PDConsole UI implement interface PDUserInterface. a. PDGUI pl = new PDConsoleUI(); b. PDGUI p2 = new PDUserInterface(); c. PDUserInterface p3 = new PDUserInterface(); d. PDUserInterface p4 = new PDConsoleUI(); e. PDGUI p5 new PDUserInterface(); PDUserInterface p6 = p5; f. PDUserInterface p7; p7 = new PDConsoleUI(); Submit 1. Word file that includes an explanation for the answers
Expert Answer:
Answer rating: 100% (QA)
B1 Interface In OOP an interface is a blueprint that defines what methods a class must implement It specifies the behavior of a class without specifying the internal details of how those methods are i... View the full answer
Related Book For
Strategic Management Text and Cases
ISBN: 978-1259196553
7th edition
Authors: Gregory Dess, Tom Lumpkin, Alan Eisner, Gerry McNamara
Posted Date:
Students also viewed these programming questions
-
Data set Theory Assume an informational record with one association parent including matches (a, b) where a can't try not to be a parent of b. (a) Write a Datalog demand which gives the graph of...
-
(a) Explain how a limit worth may be tended to at run-time, both in a syntaxtree middle person and in collected code. What is the importance word "settled" already? [3 marks] (b) Give a model program...
-
Question 2: Consider the market for Florida oranges. The demand for Florida oranges is given by the inverse demand function p = 70-2Q The market cost function for firms that sell Florida oranges is...
-
A 0.5-kg cart on an air track moves 1.0 m/s to the right, heading toward a 0.8-kg cart moving to the left at 1.2 m/s. What is the direction of the two-cart system's momentum?
-
Show that the tangent line to the graph of y = e x at the point (a, e a ) is perpendicular to the tangent line to the graph of y = e -x at the point (a, e -a ).
-
Show that after nearly all of the positrons were annihilated and the electron number density had nearly leveled off at the proton density, the ratio of the positron number density to the photon...
-
Henderson Photographys checkbook lists the following: Henderson Novembers bank statement shows the following: Requirements 1. Prepare Henderson Photographys bank reconciliation at November 30, 2016....
-
How to explain in details the constraints and integrity of the relational model regarding relations and relationships in Database System ?
-
What is it about a full moon that makes people do crazy things and commit crimes?
-
Compare two individual's credibility: Think about two people - one whom you trust implicitly and another whom you do not trust. Ideally, these should be two people you currently work with or have...
-
What has been the legacy of the yellow peril? In what respects does diversity characterize Chinatowns? What are the most significant similarities between the Chinese American and Japanese American...
-
How does bell hooks (she intentionally doesn't capitalize her name) define the concept Eating the Other? What does that mean? Do you see examples of Eating the Other in your own life? If so, where?...
-
What other major companies does each of your "owners" have? Include a link or citation of where you found the information. (Example: Comcast(Links to an external site.) also owns Dreamworks...
-
What do you understand about perception? Do you think that perception is an interesting topic? Why is this perception important to you? Will this new information change your perception? What...
-
If we skipped the heat during carbol fuchsin staining step, what is the end result? Will acid-fast bacteria be clear?
-
Flicker, Inc., a closely held corporation, acquired a passive activity this year. Gross income from operations of the activity was $160,000. Operating expenses, not including depreciation, were...
-
What intangible resources did P&G have that Lafley and McDonald used to enact their change strategies? What competitive strategy did these resources best support?
-
Why is it important for managers to recognize the interdependence in the attraction, development, and retention of talented professionals?
-
What are the strategic groups in the casino industry?
-
For several years, the Otis Capital USA Corp has been exploring for gold on its mining claims held on public lands near the Idaho-Montana border. Otis filed a proposal to expand its current...
-
When GTE Sylvania discovered it was losing market share to other television manufacturers, it developed a franchise plan that limited the number of retailers selling its product in each area....
-
Visa, MasterCard, American Express, and Discover control practically all credit card transactions in the United States. The credit card industry is a two-sided market; that is, cardholders benefit...
Study smarter with the SolutionInn App