Programming

java programming? | savvyessaywriters.us

13:Constructors

Create a Java class (program) named MovieTicket. See the Section Things to know this week.

It should include the attributes below;


A. String movieTitle                             //Set this to default to null.
B. LocalDateTime movieDateTime      // Set this to default to null.  This requires the line  import java.time.LocalDateTime;
C. int seat . // Set this to default to 0.

Use Eclipse to generate Setters and Getters for these items. - See the Section Things to know this week.
Use Eclipse to generate a toString method for this class - See the Section Things to know this week.

Create a method in this class named isValid() that returns a boolean result. This method should return true only if seat != 0 and movieTitle is not null. Otherwise it must return false.

Create 3 constructors for this class. See Section 11.3 - More Constructors - page 174-175 in the text book.
1. A constructor with no arguments. This code does not need to do anything. However, because the other constructors exist - this needs to be coded.
2. A constructor that would set movieTitle, movieDateTime
3. A constructor that would set movieTitle, movieDateTime, and seat.


***
In the main method, do the following:

You must create a reference for the MovieTicket objects and use the constructors that you created.
The LocalDateTime object can be created and used in all the tasks below:

LocalDateTime myTime = LocalDateTime.now() ;
  1. Create an instance of MovieTicket using constructor 1 and display the instance’s toString() and isValid() result.
  2. Create an instance of MovieTicket using constructor 2 and display the instance’s toString() and isValid() result.
  3. Create an instance of MovieTicket using constructor 3 and display the instance’s toString() and isValid() result.

Sample Output

MovieTicket [movieTitle=null, movieDateTime=null, seat=0] – IsValid = false
MovieTicket [movieTitle=Alita, movieDateTime=2019-04-17T19:10:02.112, seat=0] – IsValid = false
MovieTicket [movieTitle=Alita, movieDateTime=2019-04-17T19:10:02.144, seat=55] – IsValid = true

ORDER NOW

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational