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


+ Link For Assignments, GDBs & Online Quizzes Solution


+ 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: Fall 2016
Web Design and Development -CS506
Total Marks: 20
Due Date: November 21,
Please read the following instructions carefully before submitting assignment:
 You should submit your assignment before or on due date on VULMS.
 Your assignment should be your own work. It should not be copied from internet,
handouts or books.
 You are suggested to use Netbeans IDE for developing your assignment.
 You should import java swing and math packages in your classes.
 You should create project with your Roll No. in Netbean IDE and create required
 You should zip your complete project (along with .java,.class and .jar files etc.) and
upload on VULMS as a single file.
 Your zipped file should be in .zip or .rar file format only. Any compressed format
other than .zip or .rar of your programs will be considered the incorrect files and
rewarded by zero.
 Assignment sent via Email will not be replied and accepted in any case.
 If the submitted assignment does not open or file is corrupt, it will not be marked and
awarded Zero marks.
To build understanding towards building classes along with its related methods
To know how to write default and parameterized constructors
To write user-defined methods in classes and invoke them
To take user input using Graphical User Interface (GUI)
For any query about the assignment, contact at CS506@vu.edu.pk
Question: Marks 20
Write a java program to prompt the user to take the input in a double variable for the radius of a
sphere, and call method sphereVolume() to calculate the volume of the sphere.
Use the following statement to calculate the sphere volume:
Double volume = (4.0 /3.0) * Math.PI * Math.pow(radius, 3)
You should define two public classes Sphere and SphereTest. The Sphere class will contain the
calculation procedure of sphere along with data members and getter / seyter methods. SphereTest
class will contain the main method and use the object of first class to call its method.
Your program should have a separate print() method for displaying the volume of the sphere.
You should ensure that input value for radius should not be negative nor 0. In such cases, re-prompt
user to input again.
You should parse the input into related primitive data type using Wrapper classes, if required.
You should pass the user input to parameterized constructor.
You should write a default constructor that would set the value for radius to 1.0 for Sphere class.

+ 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: 11897


+ 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)

Replies to This Discussion

Solution is in Attachment files 


Tariq Bhaie still 1 error in SphereTest file

agar aesi assignment ka b solution find kar rhy hain ap log to ALLAH aap pe reham kary, 




yeh subject ksy pass akr k aaey ho ?

Zalmo zkhmo py nimak chirkny sy bhtr hy solution bta do....

Full Executable File coded in netbean


es me .jar file kahan hai...??? 

plz muj se asigmnt ni solve  ho rhe help  kr de

So simple Assignment

Now see steps.

first download JDK

Click this link to download  JDK for Windows 32 bit
Click this link to download  JDK for Windows 64 bit
Now Download Netbeans
Click this link to download Netbeans IDE 8.1

Now install JDK and nebeans

open netbeans

click on file

click on new project

give name 

create two classes one name Sphere other name SphereTest

enter code. save. execute. and submit zipp folder in LMS


Latest Activity

maheen mahan added 2 discussions to the group MTH102 Basic Algebra and Trigonometry
46 seconds ago
Profile Iconmaheen mahan and Bilal joined +M.Tariq Malik's group
6 minutes ago
Moureen Max left a comment for fabiha
12 minutes ago
Moureen Max left a comment for Maya
12 minutes ago
Moureen Max left a comment for zafar iqbal
13 minutes ago
Moureen Max left a comment for sannia satti
13 minutes ago
Moureen Max left a comment for Hina
13 minutes ago
Moureen Max left a comment for Hira Aslam
14 minutes ago
Moureen Max left a comment for Ayesha
14 minutes ago
Moureen Max left a comment for Muhammad Adeel Anjum
18 minutes ago
Moureen Max left a comment for zeeshan ali
18 minutes ago
Moureen Max left a comment for hafeez
19 minutes ago

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

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