File

1 Create a Folder in D Drive named 'WhatsApp' & Create 7 more Folders in it named as Follows:

 Pictures, GIFs, Audio, Documents, Images, Stickers, Video In the Documents Folder Create a File Named ‘The Test File.txt’ and Write your Name ‘\n’,Student Code ‘\n’,’Java’ in  it and Display it  (10)

Class

Create Class1 with Following Details :
Class Name : Jv123
Attributes : a,b,c,d
Methods :
  1. getdata() – to get Values for a&b from the Users using scanner class

  2. Calculate() – to Call all the Functions except getdata() & Showdata() 

  3. add() – to add a,b and Store it in data member: c

  4. sub() – store it in d

Create Class1 with Following Details :
Class Name : Jv456 inherited from the Jv123 class
Attributes : e
Methods :
Task 4: Let us suppose the current year is 2023.

1 showdata() – to print the following text

“Value of a = 5 and b = 6

sum = 11

difference = -1″ 

using the Values stored in c,d

Create an object for Jv456 and access the getdata(),Calculate(),showdata()

Event IconCurrent Events
×