SlideShare a Scribd company logo
Production.java
public class Production {
//Declaring instance variables
private String title;
private String director;
private String writer;
//Parameterized constructor
public Production(String title, String director, String writer) {
super();
this.title = title;
this.director = director;
this.writer = writer;
}
//Setters and getters.
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDirector() {
return director;
}
public void setDirector(String director) {
this.director = director;
}
public String getWriter() {
return writer;
}
public void setWriter(String writer) {
this.writer = writer;
}
//display() method which displays the Instance variable values
public void display()
{
System.out.println("Title: " + this.title);
System.out.println("Director: " + this.director);
System.out.println("Writer: " + this.writer);
}
//toString() method is used to display the contents of an object
@Override
public String toString() {
return "Title :" + title + " Director :" + director
+ " Writer :" + writer;
}
}
___________________________________________
Film.java
public class Film extends Production{
//Declaring instance variables
private int boxOfficeGross;
//Parameterized constructor
public Film(String title, String director, String writer, int boxOfficeGross) {
super(title, director, writer);
this.boxOfficeGross = boxOfficeGross;
}
//Setters and getters.
public int getBoxOfficeGross() {
return boxOfficeGross;
}
public void setBoxOfficeGross(int boxOfficeGross) {
this.boxOfficeGross = boxOfficeGross;
}
//display() method which displays the Instance variable values
public void display()
{
System.out.println("BoxOfiiceGross: " + this.boxOfficeGross);
}
//toString() method is used to display the contents of an object
@Override
public String toString() {
return super.toString()+" BoxOfficeGross :" + boxOfficeGross+" ";
}
}
_______________________________________________
Play.java
public class Play extends Production {
//Declaring instance variables
private int performances;
//Parameterized constructor
public Play(String title, String director, String writer, int performances) {
super(title, director, writer);
this.performances = performances;
}
//Setters and getters.
public int getPerformances() {
return performances;
}
public void setPerformances(int performances) {
this.performances = performances;
}
//display() method which displays the Instance variable values
public void display()
{
System.out.println("Performances: " + this.performances);
}
//toString() method is used to display the contents of an object
@Override
public String toString() {
return super.toString()+" Performances :" + performances+" ";
}
}
_______________________________________________
Musical.java
public class BobsTerribleTests
{
public static void main(String[] args)
{
//Creating an Film Object by passing parameters
Film titanic = new Film("Titanic", "James Cameron", "James Cameron", 2245);
//Creating an Film Musical by passing parameters
Musical music=new Musical("Avatar","James Cameron","James
Cameron","kane","Makie",4890 );
//Creating an Play Object by passing parameters
Play bus_stop = new Play("Bus Stop", "Harold Clurman", "William Inge", 478);
//Displaying the contents
System.out.println("_________Flim Object Content _________");
System.out.println(titanic.toString());
System.out.println("_________Music Object Content _________");
System.out.println(music.toString());
System.out.println("_________Play Object Content_________");
System.out.println(bus_stop.toString());
}
}
_____________________________________________
Output:
_________Flim Object Content _________
Title :Titanic
Director :James Cameron
Writer :James Cameron
BoxOfficeGross :2245
_________Music Object Content _________
Title :Avatar
Director :James Cameron
Writer :James Cameron
Composer :kane
Lyricist :Makie
BoxOfficeGross :4890
_________Play Object Content_________
Title :Bus Stop
Director :Harold Clurman
Writer :William Inge
Performances :478
_______________________________________Thank You
Solution
Production.java
public class Production {
//Declaring instance variables
private String title;
private String director;
private String writer;
//Parameterized constructor
public Production(String title, String director, String writer) {
super();
this.title = title;
this.director = director;
this.writer = writer;
}
//Setters and getters.
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDirector() {
return director;
}
public void setDirector(String director) {
this.director = director;
}
public String getWriter() {
return writer;
}
public void setWriter(String writer) {
this.writer = writer;
}
//display() method which displays the Instance variable values
public void display()
{
System.out.println("Title: " + this.title);
System.out.println("Director: " + this.director);
System.out.println("Writer: " + this.writer);
}
//toString() method is used to display the contents of an object
@Override
public String toString() {
return "Title :" + title + " Director :" + director
+ " Writer :" + writer;
}
}
___________________________________________
Film.java
public class Film extends Production{
//Declaring instance variables
private int boxOfficeGross;
//Parameterized constructor
public Film(String title, String director, String writer, int boxOfficeGross) {
super(title, director, writer);
this.boxOfficeGross = boxOfficeGross;
}
//Setters and getters.
public int getBoxOfficeGross() {
return boxOfficeGross;
}
public void setBoxOfficeGross(int boxOfficeGross) {
this.boxOfficeGross = boxOfficeGross;
}
//display() method which displays the Instance variable values
public void display()
{
System.out.println("BoxOfiiceGross: " + this.boxOfficeGross);
}
//toString() method is used to display the contents of an object
@Override
public String toString() {
return super.toString()+" BoxOfficeGross :" + boxOfficeGross+" ";
}
}
_______________________________________________
Play.java
public class Play extends Production {
//Declaring instance variables
private int performances;
//Parameterized constructor
public Play(String title, String director, String writer, int performances) {
super(title, director, writer);
this.performances = performances;
}
//Setters and getters.
public int getPerformances() {
return performances;
}
public void setPerformances(int performances) {
this.performances = performances;
}
//display() method which displays the Instance variable values
public void display()
{
System.out.println("Performances: " + this.performances);
}
//toString() method is used to display the contents of an object
@Override
public String toString() {
return super.toString()+" Performances :" + performances+" ";
}
}
_______________________________________________
Musical.java
public class BobsTerribleTests
{
public static void main(String[] args)
{
//Creating an Film Object by passing parameters
Film titanic = new Film("Titanic", "James Cameron", "James Cameron", 2245);
//Creating an Film Musical by passing parameters
Musical music=new Musical("Avatar","James Cameron","James
Cameron","kane","Makie",4890 );
//Creating an Play Object by passing parameters
Play bus_stop = new Play("Bus Stop", "Harold Clurman", "William Inge", 478);
//Displaying the contents
System.out.println("_________Flim Object Content _________");
System.out.println(titanic.toString());
System.out.println("_________Music Object Content _________");
System.out.println(music.toString());
System.out.println("_________Play Object Content_________");
System.out.println(bus_stop.toString());
}
}
_____________________________________________
Output:
_________Flim Object Content _________
Title :Titanic
Director :James Cameron
Writer :James Cameron
BoxOfficeGross :2245
_________Music Object Content _________
Title :Avatar
Director :James Cameron
Writer :James Cameron
Composer :kane
Lyricist :Makie
BoxOfficeGross :4890
_________Play Object Content_________
Title :Bus Stop
Director :Harold Clurman
Writer :William Inge
Performances :478
_______________________________________Thank You

More Related Content

Similar to Production.javapublic class Production {    Declaring instance.pdf

Link.javaLink.javapackage com.bookstore.domain.model;import .docx
Link.javaLink.javapackage com.bookstore.domain.model;import .docxLink.javaLink.javapackage com.bookstore.domain.model;import .docx
Link.javaLink.javapackage com.bookstore.domain.model;import .docxSHIVA101531
 
First java-server-faces-tutorial-en
First java-server-faces-tutorial-enFirst java-server-faces-tutorial-en
First java-server-faces-tutorial-entechbed
 
assignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docx
assignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docxassignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docx
assignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docxssuser562afc1
 
Js 单元测试框架介绍
Js 单元测试框架介绍Js 单元测试框架介绍
Js 单元测试框架介绍louieuser
 
AST Transformations at JFokus
AST Transformations at JFokusAST Transformations at JFokus
AST Transformations at JFokusHamletDRC
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScriptMichael Girouard
 
Clean code in JavaScript
Clean code in JavaScriptClean code in JavaScript
Clean code in JavaScriptMathieu Breton
 
Functional programming using underscorejs
Functional programming using underscorejsFunctional programming using underscorejs
Functional programming using underscorejs偉格 高
 
Listing.javaimport java.util.Scanner;public class Listing {   .pdf
Listing.javaimport java.util.Scanner;public class Listing {   .pdfListing.javaimport java.util.Scanner;public class Listing {   .pdf
Listing.javaimport java.util.Scanner;public class Listing {   .pdfAnkitchhabra28
 
運用Closure Compiler 打造高品質的JavaScript
運用Closure Compiler 打造高品質的JavaScript運用Closure Compiler 打造高品質的JavaScript
運用Closure Compiler 打造高品質的JavaScripttaobao.com
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Tsuyoshi Yamamoto
 
Groovy Ast Transformations (greach)
Groovy Ast Transformations (greach)Groovy Ast Transformations (greach)
Groovy Ast Transformations (greach)HamletDRC
 
Vehicle.javapublic class Vehicle {    Declaring instance var.pdf
Vehicle.javapublic class Vehicle {    Declaring instance var.pdfVehicle.javapublic class Vehicle {    Declaring instance var.pdf
Vehicle.javapublic class Vehicle {    Declaring instance var.pdfanujsharmaanuj14
 
JavaScript - i och utanför webbläsaren (2010-03-03)
JavaScript - i och utanför webbläsaren (2010-03-03)JavaScript - i och utanför webbläsaren (2010-03-03)
JavaScript - i och utanför webbläsaren (2010-03-03)Anders Jönsson
 

Similar to Production.javapublic class Production {    Declaring instance.pdf (20)

Link.javaLink.javapackage com.bookstore.domain.model;import .docx
Link.javaLink.javapackage com.bookstore.domain.model;import .docxLink.javaLink.javapackage com.bookstore.domain.model;import .docx
Link.javaLink.javapackage com.bookstore.domain.model;import .docx
 
Say It With Javascript
Say It With JavascriptSay It With Javascript
Say It With Javascript
 
First java-server-faces-tutorial-en
First java-server-faces-tutorial-enFirst java-server-faces-tutorial-en
First java-server-faces-tutorial-en
 
Unittests für Dummies
Unittests für DummiesUnittests für Dummies
Unittests für Dummies
 
assignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docx
assignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docxassignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docx
assignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docx
 
OOP Lab Report.docx
OOP Lab Report.docxOOP Lab Report.docx
OOP Lab Report.docx
 
Js 单元测试框架介绍
Js 单元测试框架介绍Js 单元测试框架介绍
Js 单元测试框架介绍
 
AST Transformations at JFokus
AST Transformations at JFokusAST Transformations at JFokus
AST Transformations at JFokus
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScript
 
Clean code in JavaScript
Clean code in JavaScriptClean code in JavaScript
Clean code in JavaScript
 
Functional programming using underscorejs
Functional programming using underscorejsFunctional programming using underscorejs
Functional programming using underscorejs
 
Listing.javaimport java.util.Scanner;public class Listing {   .pdf
Listing.javaimport java.util.Scanner;public class Listing {   .pdfListing.javaimport java.util.Scanner;public class Listing {   .pdf
Listing.javaimport java.util.Scanner;public class Listing {   .pdf
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
 
運用Closure Compiler 打造高品質的JavaScript
運用Closure Compiler 打造高品質的JavaScript運用Closure Compiler 打造高品質的JavaScript
運用Closure Compiler 打造高品質的JavaScript
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
ES6 Overview
ES6 OverviewES6 Overview
ES6 Overview
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
 
Groovy Ast Transformations (greach)
Groovy Ast Transformations (greach)Groovy Ast Transformations (greach)
Groovy Ast Transformations (greach)
 
Vehicle.javapublic class Vehicle {    Declaring instance var.pdf
Vehicle.javapublic class Vehicle {    Declaring instance var.pdfVehicle.javapublic class Vehicle {    Declaring instance var.pdf
Vehicle.javapublic class Vehicle {    Declaring instance var.pdf
 
JavaScript - i och utanför webbläsaren (2010-03-03)
JavaScript - i och utanför webbläsaren (2010-03-03)JavaScript - i och utanför webbläsaren (2010-03-03)
JavaScript - i och utanför webbläsaren (2010-03-03)
 

More from sooryasalini

Polarity is measured on a scale of electronegativ.pdf
                     Polarity is measured on a scale of electronegativ.pdf                     Polarity is measured on a scale of electronegativ.pdf
Polarity is measured on a scale of electronegativ.pdfsooryasalini
 
Geometric isomers are a subset of stereoisomers. .pdf
                     Geometric isomers are a subset of stereoisomers. .pdf                     Geometric isomers are a subset of stereoisomers. .pdf
Geometric isomers are a subset of stereoisomers. .pdfsooryasalini
 
Scientists Contributions Stanley Miller Conducted an experiment .pdf
    Scientists Contributions   Stanley Miller Conducted an experiment .pdf    Scientists Contributions   Stanley Miller Conducted an experiment .pdf
Scientists Contributions Stanley Miller Conducted an experiment .pdfsooryasalini
 
1) Microfinance is the provision of small-scale financial services t.pdf
1) Microfinance is the provision of small-scale financial services t.pdf1) Microfinance is the provision of small-scale financial services t.pdf
1) Microfinance is the provision of small-scale financial services t.pdfsooryasalini
 
The components of individual health are as followsThe three compon.pdf
The components of individual health are as followsThe three compon.pdfThe components of individual health are as followsThe three compon.pdf
The components of individual health are as followsThe three compon.pdfsooryasalini
 
-Lower income households have become more concentrated in U.S. centr.pdf
-Lower income households have become more concentrated in U.S. centr.pdf-Lower income households have become more concentrated in U.S. centr.pdf
-Lower income households have become more concentrated in U.S. centr.pdfsooryasalini
 
NO+ note O has one more electron then N, thus, .pdf
                     NO+  note O has one more electron then N, thus, .pdf                     NO+  note O has one more electron then N, thus, .pdf
NO+ note O has one more electron then N, thus, .pdfsooryasalini
 
Yes, we should be very suspicious of the bones authenticity. This .pdf
Yes, we should be very suspicious of the bones authenticity. This .pdfYes, we should be very suspicious of the bones authenticity. This .pdf
Yes, we should be very suspicious of the bones authenticity. This .pdfsooryasalini
 
WHITE COLLAR CRIMEWhite-collar crime is nonviolent crime commited.pdf
WHITE COLLAR CRIMEWhite-collar crime is nonviolent crime commited.pdfWHITE COLLAR CRIMEWhite-collar crime is nonviolent crime commited.pdf
WHITE COLLAR CRIMEWhite-collar crime is nonviolent crime commited.pdfsooryasalini
 
Web 3.0 is just how, why and at what time.Web serviceis a software.pdf
Web 3.0 is just how, why and at what time.Web serviceis a software.pdfWeb 3.0 is just how, why and at what time.Web serviceis a software.pdf
Web 3.0 is just how, why and at what time.Web serviceis a software.pdfsooryasalini
 
There are a few different reagent could be used to perform this tran.pdf
There are a few different reagent could be used to perform this tran.pdfThere are a few different reagent could be used to perform this tran.pdf
There are a few different reagent could be used to perform this tran.pdfsooryasalini
 
now a days security is very important to organization and physical s.pdf
now a days security is very important to organization and physical s.pdfnow a days security is very important to organization and physical s.pdf
now a days security is very important to organization and physical s.pdfsooryasalini
 
5.Write the VHDL code for the state machine.library ieee;use i.pdf
5.Write the VHDL code for the state machine.library ieee;use i.pdf5.Write the VHDL code for the state machine.library ieee;use i.pdf
5.Write the VHDL code for the state machine.library ieee;use i.pdfsooryasalini
 
pH = pKa + log([A-][HA])(base) HONH2 + H2O (acid) HONH3+ + OH-.pdf
pH = pKa + log([A-][HA])(base) HONH2 + H2O  (acid) HONH3+ + OH-.pdfpH = pKa + log([A-][HA])(base) HONH2 + H2O  (acid) HONH3+ + OH-.pdf
pH = pKa + log([A-][HA])(base) HONH2 + H2O (acid) HONH3+ + OH-.pdfsooryasalini
 
Solution Relation between carpels and locules Carpels is the p.pdf
Solution Relation between carpels and locules Carpels is the p.pdfSolution Relation between carpels and locules Carpels is the p.pdf
Solution Relation between carpels and locules Carpels is the p.pdfsooryasalini
 
Solution.Providing legal advice to the president of the company co.pdf
Solution.Providing legal advice to the president of the company co.pdfSolution.Providing legal advice to the president of the company co.pdf
Solution.Providing legal advice to the president of the company co.pdfsooryasalini
 
S and Se are 6th group elementsSize increase the leaving nature in.pdf
S and Se are 6th group elementsSize increase the leaving nature in.pdfS and Se are 6th group elementsSize increase the leaving nature in.pdf
S and Se are 6th group elementsSize increase the leaving nature in.pdfsooryasalini
 
Please refer this solution. This is working file for IntegersHeade.pdf
Please refer this solution. This is working file for IntegersHeade.pdfPlease refer this solution. This is working file for IntegersHeade.pdf
Please refer this solution. This is working file for IntegersHeade.pdfsooryasalini
 
Simple DefinationsIntertidal zone is the area that is above wate.pdf
Simple DefinationsIntertidal zone  is the area that is above wate.pdfSimple DefinationsIntertidal zone  is the area that is above wate.pdf
Simple DefinationsIntertidal zone is the area that is above wate.pdfsooryasalini
 
Proteobacteria are major phylum of gram negative bacteria. Major gro.pdf
Proteobacteria are major phylum of gram negative bacteria. Major gro.pdfProteobacteria are major phylum of gram negative bacteria. Major gro.pdf
Proteobacteria are major phylum of gram negative bacteria. Major gro.pdfsooryasalini
 

More from sooryasalini (20)

Polarity is measured on a scale of electronegativ.pdf
                     Polarity is measured on a scale of electronegativ.pdf                     Polarity is measured on a scale of electronegativ.pdf
Polarity is measured on a scale of electronegativ.pdf
 
Geometric isomers are a subset of stereoisomers. .pdf
                     Geometric isomers are a subset of stereoisomers. .pdf                     Geometric isomers are a subset of stereoisomers. .pdf
Geometric isomers are a subset of stereoisomers. .pdf
 
Scientists Contributions Stanley Miller Conducted an experiment .pdf
    Scientists Contributions   Stanley Miller Conducted an experiment .pdf    Scientists Contributions   Stanley Miller Conducted an experiment .pdf
Scientists Contributions Stanley Miller Conducted an experiment .pdf
 
1) Microfinance is the provision of small-scale financial services t.pdf
1) Microfinance is the provision of small-scale financial services t.pdf1) Microfinance is the provision of small-scale financial services t.pdf
1) Microfinance is the provision of small-scale financial services t.pdf
 
The components of individual health are as followsThe three compon.pdf
The components of individual health are as followsThe three compon.pdfThe components of individual health are as followsThe three compon.pdf
The components of individual health are as followsThe three compon.pdf
 
-Lower income households have become more concentrated in U.S. centr.pdf
-Lower income households have become more concentrated in U.S. centr.pdf-Lower income households have become more concentrated in U.S. centr.pdf
-Lower income households have become more concentrated in U.S. centr.pdf
 
NO+ note O has one more electron then N, thus, .pdf
                     NO+  note O has one more electron then N, thus, .pdf                     NO+  note O has one more electron then N, thus, .pdf
NO+ note O has one more electron then N, thus, .pdf
 
Yes, we should be very suspicious of the bones authenticity. This .pdf
Yes, we should be very suspicious of the bones authenticity. This .pdfYes, we should be very suspicious of the bones authenticity. This .pdf
Yes, we should be very suspicious of the bones authenticity. This .pdf
 
WHITE COLLAR CRIMEWhite-collar crime is nonviolent crime commited.pdf
WHITE COLLAR CRIMEWhite-collar crime is nonviolent crime commited.pdfWHITE COLLAR CRIMEWhite-collar crime is nonviolent crime commited.pdf
WHITE COLLAR CRIMEWhite-collar crime is nonviolent crime commited.pdf
 
Web 3.0 is just how, why and at what time.Web serviceis a software.pdf
Web 3.0 is just how, why and at what time.Web serviceis a software.pdfWeb 3.0 is just how, why and at what time.Web serviceis a software.pdf
Web 3.0 is just how, why and at what time.Web serviceis a software.pdf
 
There are a few different reagent could be used to perform this tran.pdf
There are a few different reagent could be used to perform this tran.pdfThere are a few different reagent could be used to perform this tran.pdf
There are a few different reagent could be used to perform this tran.pdf
 
now a days security is very important to organization and physical s.pdf
now a days security is very important to organization and physical s.pdfnow a days security is very important to organization and physical s.pdf
now a days security is very important to organization and physical s.pdf
 
5.Write the VHDL code for the state machine.library ieee;use i.pdf
5.Write the VHDL code for the state machine.library ieee;use i.pdf5.Write the VHDL code for the state machine.library ieee;use i.pdf
5.Write the VHDL code for the state machine.library ieee;use i.pdf
 
pH = pKa + log([A-][HA])(base) HONH2 + H2O (acid) HONH3+ + OH-.pdf
pH = pKa + log([A-][HA])(base) HONH2 + H2O  (acid) HONH3+ + OH-.pdfpH = pKa + log([A-][HA])(base) HONH2 + H2O  (acid) HONH3+ + OH-.pdf
pH = pKa + log([A-][HA])(base) HONH2 + H2O (acid) HONH3+ + OH-.pdf
 
Solution Relation between carpels and locules Carpels is the p.pdf
Solution Relation between carpels and locules Carpels is the p.pdfSolution Relation between carpels and locules Carpels is the p.pdf
Solution Relation between carpels and locules Carpels is the p.pdf
 
Solution.Providing legal advice to the president of the company co.pdf
Solution.Providing legal advice to the president of the company co.pdfSolution.Providing legal advice to the president of the company co.pdf
Solution.Providing legal advice to the president of the company co.pdf
 
S and Se are 6th group elementsSize increase the leaving nature in.pdf
S and Se are 6th group elementsSize increase the leaving nature in.pdfS and Se are 6th group elementsSize increase the leaving nature in.pdf
S and Se are 6th group elementsSize increase the leaving nature in.pdf
 
Please refer this solution. This is working file for IntegersHeade.pdf
Please refer this solution. This is working file for IntegersHeade.pdfPlease refer this solution. This is working file for IntegersHeade.pdf
Please refer this solution. This is working file for IntegersHeade.pdf
 
Simple DefinationsIntertidal zone is the area that is above wate.pdf
Simple DefinationsIntertidal zone  is the area that is above wate.pdfSimple DefinationsIntertidal zone  is the area that is above wate.pdf
Simple DefinationsIntertidal zone is the area that is above wate.pdf
 
Proteobacteria are major phylum of gram negative bacteria. Major gro.pdf
Proteobacteria are major phylum of gram negative bacteria. Major gro.pdfProteobacteria are major phylum of gram negative bacteria. Major gro.pdf
Proteobacteria are major phylum of gram negative bacteria. Major gro.pdf
 

Recently uploaded

Advances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdfAdvances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdfDr. M. Kumaresan Hort.
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringDenish Jangid
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...Denish Jangid
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXMIRIAMSALINAS13
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptxmansk2
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersPedroFerreira53928
 
NLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxNLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxssuserbdd3e8
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxakshayaramakrishnan21
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPCeline George
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfbu07226
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleCeline George
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxShibin Azad
 
Forest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDFForest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDFVivekanand Anglo Vedic Academy
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxricssacare
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfYibeltalNibretu
 

Recently uploaded (20)

Advances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdfAdvances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdf
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
NLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptxNLC-2024-Orientation-for-RO-SDO (1).pptx
NLC-2024-Orientation-for-RO-SDO (1).pptx
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Gyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptxGyanartha SciBizTech Quiz slideshare.pptx
Gyanartha SciBizTech Quiz slideshare.pptx
 
Forest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDFForest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDF
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
 

Production.javapublic class Production {    Declaring instance.pdf

  • 1. Production.java public class Production { //Declaring instance variables private String title; private String director; private String writer; //Parameterized constructor public Production(String title, String director, String writer) { super(); this.title = title; this.director = director; this.writer = writer; } //Setters and getters. public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDirector() { return director; } public void setDirector(String director) { this.director = director; } public String getWriter() { return writer; } public void setWriter(String writer) { this.writer = writer; }
  • 2. //display() method which displays the Instance variable values public void display() { System.out.println("Title: " + this.title); System.out.println("Director: " + this.director); System.out.println("Writer: " + this.writer); } //toString() method is used to display the contents of an object @Override public String toString() { return "Title :" + title + " Director :" + director + " Writer :" + writer; } } ___________________________________________ Film.java public class Film extends Production{ //Declaring instance variables private int boxOfficeGross; //Parameterized constructor public Film(String title, String director, String writer, int boxOfficeGross) { super(title, director, writer); this.boxOfficeGross = boxOfficeGross; } //Setters and getters. public int getBoxOfficeGross() { return boxOfficeGross; } public void setBoxOfficeGross(int boxOfficeGross) { this.boxOfficeGross = boxOfficeGross; } //display() method which displays the Instance variable values public void display() {
  • 3. System.out.println("BoxOfiiceGross: " + this.boxOfficeGross); } //toString() method is used to display the contents of an object @Override public String toString() { return super.toString()+" BoxOfficeGross :" + boxOfficeGross+" "; } } _______________________________________________ Play.java public class Play extends Production { //Declaring instance variables private int performances; //Parameterized constructor public Play(String title, String director, String writer, int performances) { super(title, director, writer); this.performances = performances; } //Setters and getters. public int getPerformances() { return performances; } public void setPerformances(int performances) { this.performances = performances; } //display() method which displays the Instance variable values public void display() { System.out.println("Performances: " + this.performances); } //toString() method is used to display the contents of an object @Override public String toString() {
  • 4. return super.toString()+" Performances :" + performances+" "; } } _______________________________________________ Musical.java public class BobsTerribleTests { public static void main(String[] args) { //Creating an Film Object by passing parameters Film titanic = new Film("Titanic", "James Cameron", "James Cameron", 2245); //Creating an Film Musical by passing parameters Musical music=new Musical("Avatar","James Cameron","James Cameron","kane","Makie",4890 ); //Creating an Play Object by passing parameters Play bus_stop = new Play("Bus Stop", "Harold Clurman", "William Inge", 478); //Displaying the contents System.out.println("_________Flim Object Content _________"); System.out.println(titanic.toString()); System.out.println("_________Music Object Content _________"); System.out.println(music.toString()); System.out.println("_________Play Object Content_________"); System.out.println(bus_stop.toString()); } } _____________________________________________ Output: _________Flim Object Content _________
  • 5. Title :Titanic Director :James Cameron Writer :James Cameron BoxOfficeGross :2245 _________Music Object Content _________ Title :Avatar Director :James Cameron Writer :James Cameron Composer :kane Lyricist :Makie BoxOfficeGross :4890 _________Play Object Content_________ Title :Bus Stop Director :Harold Clurman Writer :William Inge Performances :478 _______________________________________Thank You Solution Production.java public class Production { //Declaring instance variables private String title; private String director; private String writer; //Parameterized constructor public Production(String title, String director, String writer) { super(); this.title = title; this.director = director; this.writer = writer; } //Setters and getters.
  • 6. public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDirector() { return director; } public void setDirector(String director) { this.director = director; } public String getWriter() { return writer; } public void setWriter(String writer) { this.writer = writer; } //display() method which displays the Instance variable values public void display() { System.out.println("Title: " + this.title); System.out.println("Director: " + this.director); System.out.println("Writer: " + this.writer); } //toString() method is used to display the contents of an object @Override public String toString() { return "Title :" + title + " Director :" + director + " Writer :" + writer; } } ___________________________________________
  • 7. Film.java public class Film extends Production{ //Declaring instance variables private int boxOfficeGross; //Parameterized constructor public Film(String title, String director, String writer, int boxOfficeGross) { super(title, director, writer); this.boxOfficeGross = boxOfficeGross; } //Setters and getters. public int getBoxOfficeGross() { return boxOfficeGross; } public void setBoxOfficeGross(int boxOfficeGross) { this.boxOfficeGross = boxOfficeGross; } //display() method which displays the Instance variable values public void display() { System.out.println("BoxOfiiceGross: " + this.boxOfficeGross); } //toString() method is used to display the contents of an object @Override public String toString() { return super.toString()+" BoxOfficeGross :" + boxOfficeGross+" "; } } _______________________________________________ Play.java public class Play extends Production { //Declaring instance variables private int performances; //Parameterized constructor public Play(String title, String director, String writer, int performances) {
  • 8. super(title, director, writer); this.performances = performances; } //Setters and getters. public int getPerformances() { return performances; } public void setPerformances(int performances) { this.performances = performances; } //display() method which displays the Instance variable values public void display() { System.out.println("Performances: " + this.performances); } //toString() method is used to display the contents of an object @Override public String toString() { return super.toString()+" Performances :" + performances+" "; } } _______________________________________________ Musical.java public class BobsTerribleTests { public static void main(String[] args) { //Creating an Film Object by passing parameters Film titanic = new Film("Titanic", "James Cameron", "James Cameron", 2245); //Creating an Film Musical by passing parameters Musical music=new Musical("Avatar","James Cameron","James Cameron","kane","Makie",4890 );
  • 9. //Creating an Play Object by passing parameters Play bus_stop = new Play("Bus Stop", "Harold Clurman", "William Inge", 478); //Displaying the contents System.out.println("_________Flim Object Content _________"); System.out.println(titanic.toString()); System.out.println("_________Music Object Content _________"); System.out.println(music.toString()); System.out.println("_________Play Object Content_________"); System.out.println(bus_stop.toString()); } } _____________________________________________ Output: _________Flim Object Content _________ Title :Titanic Director :James Cameron Writer :James Cameron BoxOfficeGross :2245 _________Music Object Content _________ Title :Avatar Director :James Cameron Writer :James Cameron Composer :kane Lyricist :Makie BoxOfficeGross :4890 _________Play Object Content_________ Title :Bus Stop Director :Harold Clurman Writer :William Inge Performances :478 _______________________________________Thank You