uploading instructionsapi.ning.com/.../fall2015_cs506_1.docx · web viewthe assignment is not...

7
Assignment No. 01 Fall 2015 CS506- Web Design and Development Total Marks: 20 Due Date: 24/11/2015 Please read the following instructions carefully before solving & submitting assignment: It should be clear that your assignment will not get any credit if: o The assignment is submitted after due date. o The submitted assignment does not open or file corrupt. o The assignment is fully or partially copied from (other student or ditto copy from handouts or internet). o Student ID is not mentioned in the assignment File or name of file is other than student ID. o The assignment is not submitted in .java format. Uploading instructions Your submission must include: 1. All the source code (.java files) and other necessary files to compile and run your program. 2. You have to make one java file and Upload it on VULMS. Note: Use Notepad or Notepad++ for coding and JDK package for java source code compilation and running (A guideline document on JDK installation and configuration is given in course download section) Objective The objective of this assignment is to o Give you some practice exercise of Classes and Objects. And how to compile and run java programs.

Upload: others

Post on 24-Dec-2019

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Uploading instructionsapi.ning.com/.../Fall2015_CS506_1.docx · Web viewThe assignment is not submitted in .java format. Uploading instructions Your submission must include: All the

Assignment No. 01

Fall 2015CS506- Web Design and Development

Total Marks: 20

Due Date: 24/11/2015

Please read the following instructions carefully before solving & submitting assignment:

It should be clear that your assignment will not get any credit if:

o The assignment is submitted after due date.o The submitted assignment does not open or file corrupt.o The assignment is fully or partially copied from (other student or ditto copy from handouts or internet).o Student ID is not mentioned in the assignment File or name of file is other than student ID.o The assignment is not submitted in .java format.

Uploading instructionsYour submission must include:

1. All the source code (.java files) and other necessary files to compile and run your program.2. You have to make one java file and Upload it on VULMS.

Note: Use Notepad or Notepad++ for coding and JDK package for java source code compilation and running (A guideline document on JDK installation and configuration is given in course download section)

ObjectiveThe objective of this assignment is to

o Give you some practice exercise of Classes and Objects. And how to compile and run java programs.o Develop GUI (Graphical User Interface) in javao Understand the concept of Collections in java

Page 2: Uploading instructionsapi.ning.com/.../Fall2015_CS506_1.docx · Web viewThe assignment is not submitted in .java format. Uploading instructions Your submission must include: All the

Problem Statement:

You are required to write a java program which contains only two classes named as “BookInfo” and “BookMgtSys”.

BookInfo class must have the following data members:

• ISBN• Book Name• Author Name• Total Books

When you will add book then it will increment variable Total Books and decrement when you will delete book.

BookInfo class must have the following member methods:

• Default constructor• Parameterized constructor• addbook ()• searchBook ()• deleteBook ()

BookMgtSys is a public driver class that contains the main() method. The name of you file should be BookMgtSys as it is a public class in your program.

Detailed Description:

Default constructor: The default constructor will create an ArrayList.

Parameterized constructor: It should take three String parameters named as (ISBN, Book Name, and Author Name) and initializes the data members values with the passed parameters.

addBook(): This method will ask the user to enter ISBN, Book name and Author name and then add the book in ArrayList and increment the Total Book variable. After successful adding the book, A message box should be displayed containing Book information.

searchBook(): This method takes one parameter which is book name and search the book name in the ArrayList.

Page 3: Uploading instructionsapi.ning.com/.../Fall2015_CS506_1.docx · Web viewThe assignment is not submitted in .java format. Uploading instructions Your submission must include: All the

If search is found then display the Book information otherwise display message that Book not found.

deleteBook(): This method takes one parameter which is book name and delete the book from the ArrayList and then decrement the Total Book variable.

Use JOptionPane for input and output data.

Sample Output:

Within main() method, the following message box should be displayed.

If user presses 1 then it should ask the user to add further information

Page 4: Uploading instructionsapi.ning.com/.../Fall2015_CS506_1.docx · Web viewThe assignment is not submitted in .java format. Uploading instructions Your submission must include: All the

The following message should be displayed after successfully adding the book

If user presses 2 then it should ask the user to enter the name of book to be searched

The following message should be displayed after successfully searching the book

Page 5: Uploading instructionsapi.ning.com/.../Fall2015_CS506_1.docx · Web viewThe assignment is not submitted in .java format. Uploading instructions Your submission must include: All the

In case of failure, the following message should be displayed.

If user presses 3 then it should ask the user to enter name of book to be deleted.

Page 6: Uploading instructionsapi.ning.com/.../Fall2015_CS506_1.docx · Web viewThe assignment is not submitted in .java format. Uploading instructions Your submission must include: All the

If user presses 4 then program will exit.

Deadline

Your assignment must be uploaded/submitted at or before 24th Nov, 2015.

For any query about the assignment, contact at [email protected]

GOOD LUCK