Create an interface “Structure” which contain method named “Area” that return
a double value. Class “Room” and “Lab” implement the Structure interface to find
the area of room and lab.
Answers
Answer:
Foreword
It gives me great pleasure to introduce this lab book for the F.Y.B.Sc (Computer Science)
students. This being the first year of the course, a good foundation laid in this year will
make it easier for students to grasp advanced concepts in the years to come. I congratulate
the University of Pune and all faculty members who have taken the initiative and effort in
bringing out this much needed book.
The importance of laboratory courses in the subject of Computer Science cannot be
emphasized enough. It is imperative that the theory, which students learn in the
classroom, is supported by appropriate and in-depth hands-on experience in the
laboratory. Moreover, it has to be conducted in a regular and systematic manner for
complete understanding of the subject. I am sure that this lab book will satisfy this need.
The laboratory assignments are designed in such a way that they consider the different
learning pace of students and encourage original thinking. There is scope for variations in
the questions posed thereby reducing the possibility of duplication of effort. The
continuous assessment will prove beneficial not only to the students but also the
institutions to gauge the performance of the student over the duration of the course. Most
importantly, the collaborative wisdom of all the experts who have worked on this book
will reach learners in the remotest locations.
I understand that this is the first collaborative effort of its kind. I am sure that it will be
very successful and set a precedent for similar efforts in other subjects as well. I wish it
all success.
Explanation:
Table of contents
Introduction ......................................................................................................................1
Assignment Completion sheet...……………………………………………………………. 3
Lab Course II
Section I
Exercise 1..........................................................................................................................6
Using basic DOS commands like date, time, dir, copy con, type, ren etc.
Exercise 2.........................................................................................................................11
Creating the directory structure and Batch file in the DOS
Exercise 3.........................................................................................................................15
Using Windows XP graphical user interface (GUI).
Exercise 4.........................................................................................................................21
Using basic Linux commands
Exercise 5.........................................................................................................................28
Using vi editor
Exercise 6.........................................................................................................................42
Shell Programming (Writing simple shell scripts, use of conditional structures).
Exercise 7.........................................................................................................................46
Shell programming (Writing shell scripts using control structures )
Exercise 8.........................................................................................................................49
Creating simple HTML pages
Exercise 9.........................................................................................................................54
HTML programming (use of lists, tables, frames, hyperlinks)
Exercise 10.......................................................................................................................59
HTML programming ( Creation of forms, small case study to create HTML pages using all
the above learnt techniques).
Section II
Exercise 11.........................................................................................................................64
To create simple tables , with only the primary key constraint ( as a table level constraint
& as a field level constraint) (include all data types)
Exercise 12.........................................................................................................................68
To create more than one table, with referential integrity constraint, PK