SUBJECT QUESTION PAPER COLLECTION

CS6308 – JAVA PROGRAMMING

Anna University

B.E. Computer Science and Engineering Computer Science and Engineering Regulation 2019 Semester 6
1 Question Papers
2024 Earliest Year
2024 Latest Year

📚 Previous Year Question Papers

1 question papers available. Select an examination session to view its question paper.

Historical Examination Intelligence

Based on available extracted papers. Question groups and frequency are provisional, not official syllabus weightage or examination predictions.

1Source papers
1Papers with questions
2Question occurrences
2Distinct question candidates
0Exact repeat candidates
100.0%Extraction coverage

Papers by examination year

20241

Question type candidates

Other Or Unclassified1
Design1

Detected examination patterns

A+B+C1

Search historical questions

we ole wwe ew heh te & EF OT GC & அத. அ ty ee ஆ Employee 7 CO2 L6 13 Let sl be " Welcome" and s2 be " welcome". Write the code for the following statements: உ Check whether 51 is equal to 52 and assign the result to a CO2 L6 Boolean variable isEqual. உ Check whether 81 is equal to s2, ignoring case, and assign the result to a Boolean variable isEqual. உ Compare 51 with s2 and assign the result to an int variable x. உ Check whether 51 has the prefix AAA and assign the result to a Boolean variable b. உ Check whether 51 has the suffix AAA and assign the result to a Boolean variable b. e Assign the length of sl to an int variable x. உ Assign the first character of 51 to a char variable x. e Create a new string 83 that combines 81 with s2. 14 Design a simple command line calculator that performs arithmetic operations. Write a program with an exception handler that deals with nonnumeric operands. CO2 L6 INS Develop a Java program that creates a standalone GUI application that simulates an e-store which allows the user to add items (books) to a shopping cart and once all items are included, total all costs (including tax), produces an invoice, and append a transaction log file. CO4 L6 16 Suppose that a text file contains an unspecified number of scores separated by blanks. Write a program that prompts the user to enter the file, reads the scores from the file, and displays their total and average. CO3 L6 17 Write a JAVA program which creates two threads. One thread displays “Computer Science” for every 100 seconds and another thread displays “Anna university” for every 50 seconds, continuously. CO4 L6 Build a simple client-server system (use TCP), where you use the single client to chat with a dummy server. The protocol between the client and server is as follows. e The server is first started on a known port. e The client program is started (server [P and port are provided). e The client connects to the server, and then asks the user for input. The user types his message on the terminal (e.g., "Hi", "Bye", "How are you"). The user's input is sent to the server via the connected socket. e The server reads the user's input from the client socket. If the user has typed "Bye" (without the quotes), the server must reply with "Goodbye". For any other message, the server must reply with "OK". e The client then reads the reply from the server, and checks that it is accurate (either "OK" or "Goodbye"). e Ifthe user had typed "Bye", and the server replied with a "Goodbye" correctly, the client quits. Otherwise, the client asks the user for the next message to send to the server. CO3 L6 19 Write a method that returns the union of two array lists of integers using the following header: public static ArrayList<Integer> union (ArrayList<Integer> list], ArrayList<Integer> list2) For example, the addition of two array lists {2, 3, 1, 5} and {3, 4, 6} is {2, 3, 1, 5, 3, 4, 6}. Write a test program that prompts the user to enter two lists, each with five integers, and displays their union. CO2 L6 20 Create a library database as follows: BOOK (Book _id, Title, Publisher_Name, Pub_Year) BOOK_AUTHORS(Book_id, Author_Name) PUBLISHER(Name, Address, Phone) CO3 L6 BOOK COPIES(Book_id, Programme_id, No-of Copies) BOOK LENDING(Book_id, Programme_id, Card_No, Date_Out, Due_Date) LIBRARY PROGRAMME(Programme_id, Programme_Name, Address) Write a program to connect to that database and extract the following data: e Retrieve details of all books in the library — id, title, name of publisher, authors, number of copies in each Programme, etc. e Get the particulars of borrowers who have borrowed more than 3 books. e Delete a book in BOOK table. Update the contents of other tables to reflect this data manipulation operation. 21 Write a servlet program to display current date and time of server. List | COS | L6 the steps to run the program. 22 Explain the architecture of an RMI application CO5 | L2

0 eligible source papers

Design a class named Account that contains: CO2 116 e A private int data field named id for the account (default 0). e A private double data field named balance for the account (default 0). e A private double data field named annualInterestRate that stores the current interest rate (default 0). Assume all accounts have the same interest rate. e A private Date data field named dateCreated that stores the date when the account was created. e A no-arg constructor that creates a default account. e A constructor that creates an account with the specified id and initial balance. © The accessor and mutator methods for id, balance, and annuallnterestRate. e The accessor method for dateCreated. e A method named getMonthlyInterestRate() that returns the monthly interest rate. e A method named getMonthlyInterest() that returns the monthly interest. e A method named withdraw that withdraws a specified amount from the account. e A method named deposit that deposits a specified amount to the account. (Hint: The method getMonthlyInterest() is to return monthly interest, not the interest rate. Monthly interest is balance * monthlyInterestRate. monthlyInterestRate is annuallnterestRate / 12. Note that annualInterestRate is a percentage, e.g., like 4.5%. You need to divide it by 100.) Write a test program that creates an Account object with an account ID of 1122, a balance of Rs.20,000, and an annual interest rate of 4.5%. Use the withdraw method to withdraw Rs.2,500, use the deposit method to deposit Rs.3,000, and print the balance, the monthly interest, and the date when this account was created. 24 A company pays its employees on a weekly basis. The employees are of four types: Salaried employees are paid a fixed weekly salary regardless of the number of hours worked, hourly employees are paid by the hour and receive overtime pay (i.e., 1.5 times their hourly salary rate) for all hours worked in excess of 40 hours, commission employees are paid a percentage of their sales and base-salaried |» commission employees receive a base salary plus a percentage of their sales. For the current pay period, the company has decided to reward base-salaried commission employees by adding 10% to their base salaries. Write an application that performs its payroll calculations. Employee we a SalariedEmployee CommissionEmployee HourlyEmpioyee A BasePlust issionEmploy CO2 L6 ALL THE BEST

0 eligible source papers

Advanced Examination Analysis

Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.