We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Assignment No. 01 SEMESTER Spring 2013 CS506- Web Design and Development, Total Marks: 20 Due Date: 02/05/2013

Assignment No. 01
SEMESTER Spring 2013
CS506- Web Design and Development 

              

                                                                                                           Total Marks: 20

                                                                                      Due Date: 02/05/2013

Instructions

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

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

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

 

Uploading instructions

Your submission must include:

 

  1. All the source code (.java files) and other if necessary files to compile and run your program.
  2. Place all the files (Employee, LabourCard, HealthCard and Driver classes) in a Zip file and Upload it on VULMS.

 

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

Objective

The objective of this assignment is

  • To give you some practice exercise of file handling and understanding use of it in java console programs.

 

Important Requirements and Instructions:

  1. You are not allowed to use any IDE tool like Netbeans in this assignment.
  2. Assignment due date is May 02, 2013. Extra grace day (May 03, 2013) is only if last date has any problem (like server gets down or files not uploading).  Any lame excuses will not be accepted after due date. 
  3. We will not accept assignment through email in any case. Be Careful 

 

Lectures Covered: This assignment covers Lecture # 1-8

Deadline

Your assignment must be uploaded/submitted at or before 02/05/2013.

 

 

For any query about the assignment, contact at cs506@vu.edu.pk

GOOD LUCK

Question:                                                                                              

You have to develop a simple console base application, which reads an input from the user and based on user input, insert different information in different text files and also display on console.

 

Solution Guidelines:

  1. Create Emplyee.java which will contain employee information (id, name, Joining Date, Designation, Address, Phone number and email address). Constructor and setter/ getter functions implementation should be defined in the Employee class.
  2.  Create LabourCard.java which will contain labourcard information (Id, EmpId, IssueDate, ExpiryDate). Constructor and setter/ getter functions implementation should be defined in the LabourCard class.
  3. Create HealthCard.java which will contain healthcard information (Id, EmpId, IssueDate, ExpiryDate). Constructor and setter/ getter functions implementation should be defined in HealthCard class.
  4. Create Driver.java which will contain your main program. In the main program you are required to initialize overloaded constructor (Parameterized constructor) to set the values of data members of each class. Through Employee class overloaded constructor (Parameterized constructor) all the data members of Employee class should be initialized. Then insert the values of data members of Employee class in a text file “Employee.txt”.  Similarly you should initialize other class data members through their respective overloaded constructor i.e. constructor of LabourCard and HealthCard and insert the data members value in prospective text files and also display on console.
  5. You have to create text file for each class through code. For example, for employee class you have to make text file named as “Employee.txt” and for LabourCard class you have to make text file named as “LabourCard.txt” and similarly for HealthCard class you have to make text file named as “HealthCard.txt”.

 

 

Note:

  • Attached with this assignment statement is a file “CS506 Assignment No.1 Demo.gif” which shows sample working output of the assignment.

 

  • Snapshots of the desired solution along with its working are also given in the following pages.

 

 

Sample Output:

 

Before the compilation the directory only contains the following:

 

 

 

After compiling “Employee” class:

 

 

Similarly after compiling all the classes:

 

 

 

 

Now when you run the Driver class, then the following menu will be displayed:

 

 

Scenario 1: When user Enter 1:

 

 

Then the following information will be displayed:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Similarly a text file named as “Employee.txt” is also created in the directory:

 

 

When you open the “Employee” text file, then it will display the provided information:

 

 

 

Scenario 2: When user Enter 2, then:

 

 

 

 

 

 

 

 

 

 

Similarly it create a text file named as “LabourCard”:

 

When you open the LabourCard text file, then:

 

 

Scenario 3: When user Enter 3, then:

 

 

 

 

 

 

 

 

 

 

 

Similarly it creates a text file named as “HealthCard”.

 

 

When you open this text file, then it will display the following information:

 

 

 

Scenario 4: When user Enter 4, then:

 

 

 

Note: Your code must justify enough for 20 marks.

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 4089

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

Please discuss about this assignment here....thanks

See The following program, it will help in making new classes i.e. Employee.java, LabourCard.java and Healthcard.java


public class Student {

private String name;
private String rollNo;
private String program;
private String sClass;
private String phoneNo;

public void setName(String name) {
this.name = name;
}

public String getName() {
return name;
}

public void setRollNo(String rollNo) {
this.rollNo = rollNo;
}

public String getRollNo() {
return rollNo;
}

public void setProgram(String program) {
this.program = program;
}

public String getProgram() {
return program;
}

public void setSClass(String sClass) {
this.sClass = sClass;
}

public String getSClass() {
return sClass;
}

public void setPhoneNo(String phoneNo) {
this.phoneNo = phoneNo;
}

public String getPhoneNo() {
return phoneNo;
}
}//end

 @:PariFozu

ye code to compile ni ho raha.. error a rha hai. Student class compile ho gai hai bt main class compile ni ho rai pls tell

je dear i know ye exmple hai. peley me is exmple ko krna chahti hn ta k khuc idea mil jay. me again try krti hn. thnx for quick rply. ap meri help krti riey ga.

 +~§קάяƙℓє Ŧάɨяẙ~+ last date 02 may hai 

plz muja es assignment ka solution send kar do plz plz plz

CS506_Assignment#01_Solution

Attachments:

Keep trying .... but keep in mind the logic of the assignment, You are directed to write your data on console as well as text file, which will made automatically while executing specific class.

NOW Work on it.

"Nai tu Kar do ga YAR"

yar ye jo text files create krni hain, ye code execute krtay huye khud bakhud ho jayengi ya khud se krni prayngi ??aur agr khud se krni hain to kesay ??? 

here no one tell you correct ok

khud hi nahi ho jaye gi code likhna hoga, code kaise likhna hai is ke liye see lesson 8 page#89.

u will understand how to do it just read the book carefully.

koi to iska idea soluton uplod kr do..... sir ney boht tough assign di hai. jo handout m coding di hoi hai abi to wo hi compile ni ho ri to ye assing kia bne gi 

RSS

Latest Activity

+ ՏhehαrZααD + liked + !! "AS" !!'s discussion Jis Tarah ..
53 minutes ago
Pronoun liked zobialatif's discussion hazrat ali says
1 hour ago
٥ دن updated their profile
1 hour ago
+ !! "AS" !! replied to + !! "AS" !!'s discussion Jis Tarah ..
2 hours ago
Siddiq khan kakar liked + M.Tariq Malik's discussion PAK301 Pakistan Studies Short Notes, PAK301 Solved Subjective Questions, PAK301 Solved MCQs
2 hours ago
Siddiq khan kakar liked + M.Tariq Malik's group PAK301 Pakistan Studies
2 hours ago
+ ! ! JS ! ! + posted a discussion
2 hours ago
Siddiq khan kakar liked Siddiq khan kakar's discussion RIP
2 hours ago
Kashif Iqbal added 2 discussions to the group FIN624 Islamic Mode of Financing
2 hours ago
+ ! ! JS ! ! + liked + Iuuoɔǝut +'s discussion جلوۂ عشق حقیقت تھی حسن مجاز بہانہ تھا
2 hours ago
+ ! ! JS ! ! + liked + !! "AS" !!'s discussion Baat Karna ...
2 hours ago
+ ! ! JS ! ! + liked + !! "AS" !!'s discussion Ghalti...
2 hours ago
+ ! ! JS ! ! + liked + !! "AS" !!'s discussion Yaha Har Cheez ..
2 hours ago
+ ! ! JS ! ! + liked +!!!StRaNGeR!!! +'s discussion ﺁﭖ ﺩﻝ ﺟﻮﺋﯽ ﮐﯽ ﺯﺣﻤﺖ ﻧﮧ ﺍﭨﮭﺎﺋﯿﮟ ، ﺟﺎﺋﯿﮟ
2 hours ago
+ ! ! JS ! ! + liked + !! "AS" !!'s discussion Alfaaz Ki Nisbat..
2 hours ago
+ ! ! JS ! ! + liked + !! "AS" !!'s discussion Jis Tarah ..
2 hours ago
Siddiq khan kakar posted discussions
2 hours ago
+ ! ! JS ! ! + replied to + !! "AS" !!'s discussion Jis Tarah ..
2 hours ago
Zain Arshad replied to + M.Tariq Malik's discussion ENG201 Business and Technical English Writing Assignment No 01 Fall 2019 Solution & Discussion in the group ENG201 Business and Technical English Writing
2 hours ago
Nayyab Anwar updated their profile
3 hours ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service