0% found this document useful (0 votes)
133 views3 pages

Continuous Assessment Test - I: Programme Name & Branch: B.Tech

The document contains instructions for a Java programming exam consisting of 3 questions worth 10 marks each for a total of 30 marks. Question 1 involves writing Java programs to perform various tasks related to student course registration, validating expressions, and identifying sentence types. Question 2 involves creating classes to model an online store, employee health records, and student hostel/day scholar details. Question 3 involves creating bank account and reservation classes with transactions and implementing a coordinate class with distance calculation.

Uploaded by

Palanisamy V
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views3 pages

Continuous Assessment Test - I: Programme Name & Branch: B.Tech

The document contains instructions for a Java programming exam consisting of 3 questions worth 10 marks each for a total of 30 marks. Question 1 involves writing Java programs to perform various tasks related to student course registration, validating expressions, and identifying sentence types. Question 2 involves creating classes to model an online store, employee health records, and student hostel/day scholar details. Question 3 involves creating bank account and reservation classes with transactions and implementing a coordinate class with distance calculation.

Uploaded by

Palanisamy V
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Continuous Assessment Test – I

Programme Name & Branch: B.Tech

Course Name & Code: Java Programming & CSE1007

Class Number: VL2021220103772 Slot: A1+TA1

Exam Duration: 1Hr Maximum Marks: 30

S.No. Answer All Question 3 x 10 = 30 Marks Max. CO BL


Marks
1. Write a Java program that takes n student’s wish list for the
next semester course registration. The number of credits to be
registered can be minimum 15 to 21(3 credits each).
a. write a function getwishlist() to read the courses
needed by each student as 1D array.
b. write a function displaywishlist() to display n students
wishlist details in a 2D jagged array.
c. write a function SearchDuplicate() to search if there is
duplicate values
d. Write a function count() to get a course name as input
and count the number of students registered for that
course.
(or)
Write a Java program to read an expression as string and check
whether the expression is valid based on following criteria.
1. Expression should start with the parenthesis. 10 CO1 L3
2. The number of Parenthesis matches ex: (a+b)
3. Each operator has both left and right operands.
4. The operands should be of same datatype.
(or)
Write a program that reads a sentence from the user and print
the type of sentence.
Ex:
declarative sentence (statement) – The sun rises in the east.
(ends with full stop)
interrogative sentence (question) - What is your name? (ends
with ?)
imperative sentence (command) – open the door. (starts with
verb)
exclamative sentence (exclamation) - Oh my God! (ends with !)
2. Write a Java program to create a class OnlineStore with
datamembers itemname, itemid, itemprice, rating. Create n
objects to store n items in an array. 10 CO2 L3
a. write necessary constructors to read the input values
b. Write a static method search() to takes either
itemname or itemid to search for a particular item.
c. Write a static method SimilarItems() to get an item
name and display other similar items for price
comparison.
d. Write a static method sort() to sort the items with
respect to the item-id and display them.
e. Write a static method popularlist() to display the items
whose ratings are greater than 4 out of 5.
(or)
Given a class EmployeeHealth, with data members, id, name,
age, DOJ(date of joining), height, weight, diabetic (Boolean).
Create an array of objects to maintain the health information
of n employees.
a. write a method getdetails() to read inputs.
b. Write the static method fittest() to identify the
employee with height >5.7 and weight ranging
between 70-75KG with no diabeties.
c. Write a static method senior() to identify the
employees whose experience is above 10 years.
d. Write a static method sort() to display the employee
details with respect to salary.
(or)
Create a class Student with personal details as data members.
Create a class Hostel inherited from Student with data
members hostel room details and local guardian name and
address. Create a class Dayscholar inherited from Student with
personal details. Use constructors to pass values.
a. Write a method print() in student class and override
the method in child class. use dynamic polymorphism
to call the methods of respective class in a sorted
order.
b. Write a static method count() that shows the total
number of students.
c. Write a method getdata() in student class and
override the method in both the child classes to get
inputs.
3. Write a java program to create a class BankAccount that
maintains a minimum balance of Rs. 5000. Use constructors to
take necessary inputs. Create a methods CheckBalance() to
check the minimum balance criteria. Summary() to display the
10 CO2 L3
balance after each transaction.
Create a class Deposit which is derived class of the
BankAccount. Create method AddAmt() to deposit money into
the account.
Create a class Withdraw which is derived class of
BankAccount. Create a method WithdrawAmt() to withdraw
from account.
Check for minimum balance criteria every time. Write a demo
class that performs the transactions until the minimum
balance is reached.
(or)
Create an interface Reserve having 2 data members
Seat_First, Seat_Second to store the seats available in first
class and second class of a train. The interface has an method
doReservation(); Create a class Reservation that implements
the interface Reserve. The class Reservation implements the
method doReservation using inner class to reserve a ticket in
first class/second class of a train. If the reservation not
possible, give a waiting list number.
(or)
Define a package to implement the following:
a. Create a class called as Coordinate which stores x and y
coordinate values.
b. Develop constructors to initiate the coordinates based
on the parameter passed.
c. Design method print() to print the members of the
Coordinate class in the “(x,y)” format.
d. Develop a demo class that imports the Coordinate class
and find the distance between two coordinates.
e. Design a static method distance() to find the distance
between two coordinates.

You might also like