Java Assignment.pdf - Core Java Assignment Monday, March...

This preview shows page 1 - 2 out of 2 pages.

1Core Java AssignmentCOMPUSOFTCOMPUTER EDUCATION | Canal Road, Vesu-SURAT @7490008464|Monday, March 15, 2021Java Assignment1)Create a constructor of a class INVERSE in order to get 5 integer numbers (including positive andnegative). And convert the positive to negative and vice-versa in another function.For e.g.: input: [5,-6, 9,-4, 7]output: [-5, 6,-9, 4,-7]2)Create three methods of same name ADD() having two parameters:i)To add two names, reverse it and check whether it is palindrome or not.ii)To merge two arrays of different sizes into third Array.iii)To find the average of all the numbers which are divisible by 5 in the given range.3)We want to store the information of different vehicles. Create a class namedVEHICLEwith twodata member named mileage and price. Create its two subclassesCARwith data members to store ownership cost, warranty (by years), seating capacity and fueltype (diesel or petrol).

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 2 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
Abad

Newly Uploaded Documents

Show More

Newly Uploaded Documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture