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.

Suppose you have to write a small Java program that catches exceptions with super classes. You are required to use inheritance to create an exception superclass (called ExceptionA) and exception subclasses ExceptionB and ExceptionC; where ExceptionB inherits from ExceptionA and ExceptionC inherits from ExceptionB. Your program must demonstrate that the catch block for type ExceptionA catches exceptions of types ExceptionB and ExceptionC.


Hint: You can use Arithmetic exception like divide by 0 or any similar one.
NOTE: You are required to use Graphical User Input (GUI) to show output on the screen.

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

.

+ 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

Sorry folks! im using a system that is out of dated and os xp thats too time consuming, and not supporting any app. nevethless I must give you complete solution. Dont waste your time you have to make your assignment yourself. I'll assist you

NOTE: You are required to use Graphical User Input (GUI) to show output on the screen.

for graphical user interface we use command
import javax.swing.*;

@Anam "

for graphical user interface we use command
import javax.swing.*;" This is only a library or package to include/draw GUI... there are an other steps involve to physical draw it on canvas/form, right now I am busy but will share an idea later. you have shared good idea though, keep it up. :)

@Muhammad Tariq I've the complete coding but need to implement and execute. without execution how can I say this is the complete solution. however if any body share his or her system via team viewer, i can give complete solution

Please send me at my email address. Sherwani05@gmail.com

@Anam You have complete code, very good. How can I help you to execute your code or what kind of difficulties are you facing to execute your code, by the way you can still share your code by attaching files, if you want to.;)

Anam these guys will never understand what you are saying they need only solution, as I am trying to convince the users of this site since 2011. but they are totally blind & def. I gurantee that even a complete solution is given to them still they will ask more which is "how to compile and run the program" Although the assignment given this time is one of the post on stackoverflow.com and even solution is there...................
"http://stackoverflow.com/questions/12791514/handling-exceptions-using-superclasses-in-java"

Attachments:

try this code and uplaod error report here if any

import javax.swing.*;
import java.util.Scanner;
public class ExceptionA
{
private int numerator;
private int denominator;
private double quotient;

Public static void main(String[] args)
{
ExceptionA oneTime = new ExceptionA();
oneTime.doIt();
}
public void doIt()
{
try
{
String input = JOptionPane.showInputDialog("Enter Numerator");
Scanner keyboard = new Scanner(System.in);
numerator = keyboard.nextInt();
String input = JOptionPane.showInputDialog("Enter Denominatorr");
Denominator = keyboard.nextInt();

if (denominator == 0)
throw new ExceptionAException();
quotient = numerator /(double) denominator;
System.out.println(numerator + "/" + denominator +"=" + quotient);
JOptionPane.showMessageDialog(null, numerator + "/" + denominator +"=" + quotient);

}
catch (ExceptionAException e)
{
JOptionPane.showMessageDialog(null, "No number can be devisible by Zero");
system.exot(0);
}
}
}

Hi

Can you please connect through teamviewer? Please email me at bwpmukarram@gmail.com

Thanks so much for the help.

@Anam Sorry to say but I really unable to understand this piece of code, Where are ExceptionB and ExceptionC Classes? where is Inheritance? where is pure virtual function? how are you dealing with controls? there is some spelling mistakes e.g system.exot(0); and some upper and lower case problem e.g Public static void main(String[] args).??

bro pls ia ka solution upload kr den pls pls pls

RSS

Latest Activity

+ ! ! ! ! ! Blu Moon replied to + "αяsαℓ " Ќąƶµяɨ •"'s discussion Happy Marriage to "Zee" & " Nomi weds Noor"....!
37 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked + Iuuoɔǝut +'s discussion After and Before Marriage situations
39 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked + Iuuoɔǝut +'s discussion Rules for Happy Marriage Life
39 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked +***piya o ry piya***+'s discussion eng201
39 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked 彡JK彡 ❤️'s discussion جسکی سنو وہی فرشتہ
40 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked + ! ❤INNOCENT❤'s discussion Faqeer
40 minutes ago
+++"MinShah"+++ updated their profile
40 minutes ago
abdul bari updated their profile
41 minutes 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
46 minutes ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + "αяsαℓ " Ќąƶµяɨ •"'s discussion Happy Marriage to "Zee" & " Nomi weds Noor"....!
49 minutes ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + "αяsαℓ " Ќąƶµяɨ •"'s discussion Happy Marriage to "Zee" & " Nomi weds Noor"....!
50 minutes ago
+ "αяsαℓ " Ќąƶµяɨ •" and Isha Chuhdary are now friends
50 minutes ago
Waseem Aziz added a discussion to the group MGMT627 Project Management
51 minutes ago
Waseem Aziz added a discussion to the group STA630 Research Methods
1 hour ago
Waseem Aziz joined + M.Tariq Malik's group
1 hour 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
1 hour ago
Profile IconZain Arshad, Misha Rajpoot and Nimra zahid joined + M.Tariq Malik's group
1 hour ago
Naser Javed (BBIT-6) replied to MIT's discussion Visual Programing (CS411) Assignment#01 Deadline Date = 18-11-2019 in the group CS411 Visual Programming
1 hour ago
Zaheer Bashir replied to + M.Tariq Malik's discussion FIN630 Investment Analysis & Portfolio Management GDB Fall 2019 Solution & Discussion in the group FIN630 Investment Analysis & Portfolio Management
1 hour ago
Zaheer Bashir joined + M.Tariq Malik's group
1 hour ago

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

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