Package extended

Source Code of extended.CDDemo

package extended;

import com.jitcaforwin.extended.JitcaiTunesController;
import com.jitcaforwin.extended.api.IJitcaITunesController;
import com.jitcaforwin.extended.api.internal.CD;
import com.jitcaforwin.main.exceptions.JitcaException;





public class CDDemo {

  public static void main(String[] args) {
    try {
      IJitcaITunesController iTunes = new JitcaiTunesController(true);
     
      CD cd = iTunes.getCD();
     
      if (cd == null)
      {
        if (iTunes.getCDs() != null){
          System.out.println("More than one CD is available!");
        } else {
          System.out.println("No CD available!");
        }
      } else {
        System.out.println("Start playing: " + cd.getTitle());
        cd.play();
      }
     
      iTunes.close();

    } catch (JitcaException e) {
      e.printStackTrace();
    }
  }

}
TOP

Related Classes of extended.CDDemo

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.