TelevisionDemo copy 76 - /...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
//This class demonstrates the Television class import  java.util.Scanner; //Amir  poudel //COSC 1437.8001 //Television class for lab 3, store in Lab3_apoudel class  Television { //Task #1 step 1 and step 2 private  String  MANUFACTURER  =  "Toshiba" ; //The maker of the TV private   int   SCREEN_SIZE ; //size of the TV //Task #1 step 3 and step 4 private   boolean   powerOn ; // private   int   channel ; // private   int   volume ; // //Task#2 step 1 - constructor public  Television(String brand,  int  size) { //Task#2 step 2 MANUFACTURER  = brand; SCREEN_SIZE  = size; //[email protected] step 3 powerOn  =  false ; volume  = 20; channel  = 2; } //Task #3 step 2 - mutator setChannel public   void  setChannel( int  station) { channel  = station; } //Task#3 - return the volume public   int  getVolume() { return   volume ; } public   int  getChannel() { return   channel ; } public  String getManufacturer()
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
{ return   MANUFACTURER ; } public   int  getScreenSize() { return   SCREEN_SIZE ; }
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern