| Assignment No. 01 CS506: Web Design & Development | Total Marks: 20 Due Date: 21/10/2009 | |
Instructions Please read the following instructions carefully before submitting assignment: It should be clear that your assignment will not get any credit if: § The assignment is submitted after due date. § The assignment is submitted via email. § The submitted assignment does not open or file is corrupt. § All types of plagiarism are strictly prohibited. Note: You have to upload only .java files. Assignment in any other format (extension) will not be accepted. If you will submit code in .doc (Word document) you will get zero marks. No assignment will be accepted with extension other than .java. Objectives The objective of this assignment is to provide hands on experience of using § Basic concepts of java § OOP concepts such as inheritance, function overriding Guidelines § Code should be properly aligned and well commented. § Follow java naming conventions while writing class names, variables name, functions name etc | |||
Assignment | | ||
Problem Statement Write the code to implement the concept of inheritance for Vehicles. You are required to implement inheritance between classes. You have to write four classes in java i.e. one super class, two sub classes and one driver class. Vehicle is the super class whereas Bus and Truck are sub classes of Vehicle class. Transport is a driver class which contains main method. Detailed description: Detailed description of Vehicle (Super class): The class Vehicle must have following attributes:
The Vehicle class must have following methods:
Detailed description of Truck (Sub class): The class Truck must have following attribute: Cargo weight limit (Kilo grams) The above class must have following methods:
Detailed description of Bus (Sub class): The class Bus must have following attribute: No of passengers
The above class must have following methods:
Create a class Transport which contains the main method. Perform the following within main method:
| |||
Deadline: Your assignment must be uploaded/submitted on or before 21st Oct, 2009 | |||
For solution follow this blog and comment for solution
Subscribe to:
Post Comments (Atom)
Just look at your blog...not a single line is clearly readable and i think that you have got all material copied from www.vu.ysapak.com which is the official forum of vu students. and you are just having this for advertisement ....its too bad