Location via proxy:
[ UP ]
[Report a bug]
[Manage cookies]
No cookies
No scripts
No ads
No referrer
Show this form
Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
16 views
Java Programming
Java sample questions amity university
Uploaded by
opninja173
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Java Programming For Later
Download
Save
Save Java Programming For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
16 views
Java Programming
Java sample questions amity university
Uploaded by
opninja173
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Java Programming For Later
Carousel Previous
Carousel Next
Save
Save Java Programming For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 13
Search
Fullscreen
[No. of Printed Pages — 3] SES2 17201 Enrol. No. ..... (ET) SUPPLEMENTARY EXAMINATION : JUNE 2022 JAVA PROGRAMMING Time: 3 Hrs. Maximum Marks : 60 Note: Attempt questions from all sections as directed. SECTION - A (24 Marks) Attempt any four questions out of five. Each question carries 06 marks. 1. What is the object oriented paradigm? State four Features of Java. 2. (a) Write a program to implement the Fibonacci series using for loop control structure. (3) (b) Describe the following methods related to String (i) replace() (ii) compareTo() Gi) charAt() 6) P.T.O. Trt a | - @ scanned with OKEN ScannerSES2, y1201 3 SEs2 17201 [access Mositirs available in java? (b) Deseride the uses of Final and super keywords 3, Discuss ers eect te visibility of @ member eee . ers € ~ So in di SECTION - C ee sefis of using Packages? Write down a package and using it in Java (Compulsory) ating 9, (a) Create a class Train inherited from Super fast ceptions? How are exceptions Train class. Define proper constructor for both of jth suitable example? out ex the classes and methods to collect and display va explain W data of passengers . Show the example using SECTION - B (20 Marks) virtual base class. 8) any two questions out of three. (b) Write an applet for each of following graphics question carries 10 marks. methods. drawoval(), drawrect(), drawline(), filloval(). 6 is multithreading? Explain the steps for ® ing thread in Java. ©) (b) Explain life cycle of thread with an example. 6) 1, ‘Some Useful Annotations from the Standard " at is layout manager ? Explain the Flow Lay Border Layout with a suitable example. (5) (100) @ scanned with OKEN Scannervu vu LULLLLLLLLLLUUULUUUOULOTTE INo. of Printed Pages — 3 ORS TT201 Enrol, No. jcc [ET] END SEMESTER EXAMINATION : April-May, 2023 JAVA PROGRAMMING Time > 3) Hrs, Maximum Marks » 60 Note Attempt questions from all sections as dir SECTION — A (24 Marks) Attempt any four questions out of five. Each question carries 06 marks. 1. Explain the various features of Java, Why is Java known as platform-neutral language? Explain. 2. Explain the importance of event handling mechanism, What is delegation event model? Explain with examples. 3. What are the various java annotations and its types? Write a program to create custom annotations. P.T.O, @ scanned with OKEN Scanner; 17201 2 4. Write @ program t0 explain the dittereg, abstract classes and final classes betveey Tr201 3 oss SECTION-C a6 Marks) 5. What are the various types of inheritances ee, Upon, cd by Java? How is multiple inherit ‘ance iny Plemened ig 9. (@) Write a program to display the ereation of teads Java? in two different ways. ®) (b) Create a class Box in a package Mypackage with its length, breadth and depth. Provide appropriate Constructors), which pass value of length, breadth SECTION - B 20 Mar rks) Attempt any two questions out of three Each question carries 10 marks ae seal : ae uae methods to calculate volume and to display al information of Box. Design different class TestBox class which is not in Mypackage package, and CCCcccee 6 Explain the life eycle of a thread. Write a program to which will contain main function, From this main implement thread priorities, ‘eae a function, create two Box objects by taking all is ir . necessary information. @) 7. What is maven? Explain the Maven Life cycle in a mY, detail. be 8. Explain the significance of the following in detail: So) as (i) Event Listeners ; (ii) Layout Managers “se “~~ “ (1200) = @ scanned with OKEN Scanner4 1820 17201 + custNam fe must be atleast of 4 characters category must be either ‘Platinum’, ‘Gold’ or ‘Silver: when any of these validations fail, then raise & user defined exception {nvalidInputException estCustomer having main method. Create a class T Create an ‘Ask user to enter customer details. {form validations. Print object of Customer and per details of customer. 7, Asset of 5 words are given: Write a program to reverse each word and arrange the resulting words in alphabetical order. Explain the following terms: (i) super (ii.) finalize() method jii.) object class ym to design a GUI based Calcul a prograi cation which perform addition, subtracti plication and division operation on integers? 5 1820 17201 SECTION - C (16 Marks) (Compulsory) (a) Create a class named Movie that can be used with your video rental business. The Movie class should track the Motion Picture Association of America (MPAA) rating (e.g., Rated G, PG-13, R), ID Number, and movie title with appropriate accessor and mutator methods. Also create an equals() method that overrides Object 's equals() method, where two movies are equal if their ID number is identical. Next, create three additional classes named Action , Comedy, and Drama that are derived from Movie . Finally, create an overridden method named caleLateFees that takes fas input the number of days a movie is late and returns the late fee for that movie. The default late fee is $2/day. Action movies have a late fee of $3/day, comedies are $2.50/day, and dramas are $2/day. Test your classes from a main method (8) P.T.0. @ scanned with OKEN ScannerT201 2 3. Assume that you are running a courier service faci Bach parcel user wants to send needs to ha certain number of stamps. The number of stat depends upon the weight of the parcel, Create a el to accept weight of five parcels in floating-point valug ‘Assume by your own range of weights and corresponding number of stamps to be spend. The cost of each stamp is Rs. 15 each per kg, Also, there js an amount charged by the courier company also depending upon the location of the courier to be delivered. For national courier, charges are Rs 50, for courier to be delivered in the same city charges are Rs30. Write a computer program to calculate and display the total cost of each parcel depending upon the number of stamps required to spend on each parcel and location of courier. Discuss some general rules for using layout managers, _ Deserive the various layout managers available in AWT? 4 17201 3 1820 5. If'auser creates two threads in a program, how many threads are actually running? Explain the complete flow of execution of a thread in a program along with its life cycle. SECTION - B (20 Marks) Attempt any two questions out of three. Each question carries 10 marks. 6. Can derived class object be assigned to a base class reference variable? How this concept is useful in Dynamic Method Dispatch? Explain with Example? Create a class Customer having following members: private String custNo private, String custName, private String category Parameterized constructor to initialize all instance variables Getter methods for all instance variables Perform following validations in the constructor + custNo must start 'c' or P.T.O. a @ scanned with OKEN Scanner[No. of Printed Pages — 6] 1820 1T201 Enrol. No. ... (ET] END SEMESTER EXAMINATION : NOV-DEC 2022 JAVA PROGRAMMING Time : 3 Hrs. Maximum Marks : 60 Note: Attempt questions from all sections as directed. SECTION - A (24 Marks) Attempt any four questions out of five. Each question carries 06 marks. 1. Discuss various types of access modifiers available in java. How access modilfier effect the visibility of a member in various access locations? 2. Differentiate between the following: (i) throw vs throws (ii) multithreading vs multiprocessing P.T.O. @ scanned with OKEN Scanner4. Explain the importance of event hand 11201 “5 in applet programming. What i model? SECTION - C (a6 Marks) (Compulsory) : 3 5. Write a program using constructors: 5, (a) Write a Java program by using BufferedReader class to prompt a user to input his/her name example the following and then the output will be shown as an (a) To convert the lower @aseust below case. Hello
' ) (b) To compare two strings. 7 (b) Create the following class hierarchy in your program, Make suitable assumptions for data members, constructors, methods and demonstrate SECTION = B Wing two questions out’ the working of each class. tion carries 10 Inheritance in Java wh ‘Rutomabiles >) Strainer, \ \ bs) 2) 6) (1000) (806) © Scanned with OKEN Scanner0. of Printed Pages — 3] 201 iT} END SEMESTER EXAMINATION : APRIL-MAY 2022 JAVA PROGRAMMING 60 ime; 3 Hrs. Maximum Marks : ote: Attempt questions from all sections as directed. SECTION - A (24 Marks) Attempt any four questions out of five. Each question carries 06 marks. m. Also 4. Explain thread life cycle with a neat diagrar explain thread priorities. Explain the architecture of an applet with the help of an example. Explain the following : Maven build Li e (a) vi ui ifecycle (3) b) Project Obj 5 (b) Projec' ject Model (3) Peo: (806) @ scanned with OKEN Scanneryr201 portance of event handling mee} 17201 ys im — re ramming. What is delegation Jet prow! SECTION —~ c (16 Marks) (Compulsory) a Bg constructors 19am (2) Write 2 Java program by using BufferedReader rogral lass to prompt a user to input her name ‘and then the output will be shown as an example he lower case string below : vert t Hello
! (8) are two stri (b) Create the following class hierarchy in your Program. Make suitable assumptions for data members, constructors, methods and demonstrate the working of each class, Inheritance in Java 7. Explain the exception handlin AVA. What is finally BlOe sed? Give suitable example, Explain the types of aim stam to describel ROWE annotations (1000; (806) @ scanned with OKEN Scanner[No. of Printed Pages ~ 3] 11201 [ET] EnrolseNoe s.r ENL ) SEMESTER EXAMINATION : APRIL-MAY 2022 JAVA PROGRAMMING Time: 3 Hrs. Maximum Marks ; 60 Note: Attempt questions from all sections as directed. SECTION - A (24 Marks) Attempt any four questions out of five. Each question carries 06 marks. 1. Explain thread life cycle with a neat diagram. Also explain thread priorities. 2. Explain the architecture of an applet with the help of an example. 3. Explain the following : (a) Maven build Lifecycle @) (b) Project Object Model (3) Pal.O. (806) @ scanned with OKEN ScannerSES2 2 Modifiers ® ct the visibility of a member Te itable in java? 3. Discuss vari How access . in different one 4. What are the sing Packages? Write down the steps of ol program with rackage and using it in Java ns? How are exceptions jth suitable example? -B (20 Marks) Attempt any ns out of three. Each ques jes 10 marks. 6. (a) What is mult Explain the steps for ing threa (6) cre id with an example, () ions from the Standard 8. (a) What is layout and Border Lay lain the Flow Layout itable example, (5) yr20t {) Describe the uses of final and with respect to inheritance, SECTION - C (Compulsory) 9 data of passengers . Show th virtual base class. filloval(). @ scanned with OKEN Scannerpewrrwrevuwrwewewewzweewwew w [No. of Printed Pages ~ 3] SES2 17201 Enrol. No. . SUPPLEMENTARY EXAMINATION : JUNE 2022 JAVA PROGRAMMING 3 Hrs Maximum Marks : 60 Note: Attempt questions from all sections as directed. SECTION - A (24 Marks) {ttempt any four questions out of five. Each question carries 06 marks. 1. What is the object oriented paradigm? State four Features of Java. 2. (a) Write a program to implement the Fibonacci series using for loop control structure. (3) (b) Describe the following methods related to String (i) replace() (ii) compareTo() (iii) charAt() G) P.T.O. @ scanned with OKEN Scanner
You might also like
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Mark Manson
4/5 (6124)
Principles: Life and Work
From Everand
Principles: Life and Work
Ray Dalio
4/5 (627)
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Brené Brown
4/5 (1148)
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
Chris Voss
4.5/5 (933)
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Jeannette Walls
4/5 (8214)
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Angela Duckworth
4/5 (631)
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
Jesmyn Ward
4/5 (1253)
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Stephen Chbosky
4/5 (8365)
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Phil Knight
4.5/5 (860)
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Carmen Maria Machado
4/5 (877)
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Margot Lee Shetterly
4/5 (954)
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Ben Horowitz
4.5/5 (361)
Steve Jobs
From Everand
Steve Jobs
Walter Isaacson
4/5 (2922)
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
Ashlee Vance
4.5/5 (484)
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Siddhartha Mukherjee
4.5/5 (277)
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
Colm Toibin
3.5/5 (2061)
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Fredrik Backman
4.5/5 (4972)
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Frank McCourt
4.5/5 (444)
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
Garth Stein
4/5 (4281)
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
Sarah M. Broom
4/5 (100)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
Meik Wiking
3.5/5 (447)
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Thomas L. Friedman
3.5/5 (2283)
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Roxane Gay
4/5 (1068)
Yes Please
From Everand
Yes Please
Amy Poehler
4/5 (1987)
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Gilbert King
4.5/5 (278)
The Outsider: A Novel
From Everand
The Outsider: A Novel
Stephen King
4/5 (1993)
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
Ruth Ware
3.5/5 (2619)
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
Betty Smith
4.5/5 (1936)
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
Viet Thanh Nguyen
4.5/5 (125)
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Doris Kearns Goodwin
4.5/5 (1912)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Dave Eggers
3.5/5 (692)
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
Hilary Mantel
4/5 (4074)
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Naomi Klein
4/5 (75)
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Bob Woodward
3.5/5 (830)
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Jay Sekulow
3.5/5 (143)
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
Jennifer Egan
3.5/5 (901)
John Adams
From Everand
John Adams
David McCullough
4.5/5 (2530)
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
M L Stedman
4.5/5 (790)
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
George Packer
4/5 (45)
Little Women
From Everand
Little Women
Louisa May Alcott
4/5 (105)
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel
John le Carré
3.5/5 (109)
Related titles
Click to expand Related Titles
Carousel Previous
Carousel Next
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Principles: Life and Work
From Everand
Principles: Life and Work
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Her Body and Other Parties: Stories
From Everand
Her Body and Other Parties: Stories
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Steve Jobs
From Everand
Steve Jobs
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Brooklyn: A Novel
From Everand
Brooklyn: A Novel
A Man Called Ove: A Novel
From Everand
A Man Called Ove: A Novel
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
The Little Book of Hygge: Danish Secrets to Happy Living
From Everand
The Little Book of Hygge: Danish Secrets to Happy Living
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Yes Please
From Everand
Yes Please
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
The Outsider: A Novel
From Everand
The Outsider: A Novel
The Woman in Cabin 10
From Everand
The Woman in Cabin 10
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
From Everand
The Sympathizer: A Novel (Pulitzer Prize for Fiction)
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Wolf Hall: A Novel
From Everand
Wolf Hall: A Novel
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
John Adams
From Everand
John Adams
The Light Between Oceans: A Novel
From Everand
The Light Between Oceans: A Novel
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
Little Women
From Everand
Little Women
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel