Keyboard.java - /* * To change this license header, choose...

This preview shows page 1 - 2 out of 2 pages.

/** To change this license header, choose License Headers in Project Properties.* To change this template file, choose Tools | Templates* and open the template in the editor.*/package project4;/**** @author Anthony*/public class Keyboard {private int price;private double size;private String switchtype;public Keyboard(){price = 300;size = 65;switchtype = "Tactile";}public Keyboard (int userprice, double usersize, String userswitchtype){setPrice(userprice);setSize(usersize);setSwitchtype(userswitchtype);}public int getPrice(){return price;}public double getSize(){return size;}public String getSwitchtype(){return switchtype;}public void setPrice(int userprice){if (userprice > 200 && userprice <= 900)price = userprice;
End of preview. Want to read all 2 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
N/A
Tags
switch

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture