CSC113_Lab5 - King Saud University College of Computer and...

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

View Full Document Right Arrow Icon
King Saud University College of Computer and Information Systems, Department of Computer Science CSC 113: Java Programming-II, Spring2011 Lab #5 : Inheritance
Background image of page 1

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

View Full DocumentRight Arrow Icon
King Saud University College of Computer and Information Systems, Department of Computer Science CSC 113: Java Programming-II, Spring2011 Lab #5 : Inheritance Product Product(String n, int q, int p) Constructor for initializing the name, quantity, and the price. display() Display the name, quantity, and the price. TV TV(String n, int q, int p, int s) Constructor for initializing the name, quantity, price, and the size of the TV. display() Display the name, quantity, price, and the size of the TV. Computer Computer(String n, int q, int p, String c) Constructor for initializing the name, quantity, price, and the CPU of the computer. display() Display the name, quantity, price, and the CPU of the computer. Store Store(String l, int s) Constructor for initializing the location and the size. addProduct(Product p)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

CSC113_Lab5 - King Saud University College of Computer and...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online