1. Write a program to create a class Voter which contains attributes name, date_of_birth and voter_id and voter has a Voter_Card. Provide appropriate constructor to initialize all the attributes of the Voter but voter id must be assigned automatically only when the age of the voter is greater than or equal to 18 years.
VoterCard is a nested class with attributes voter_id and Voter_name. Make sure that voter card is created only when user is a valid voter and if it is already created then must not be assigned the new voter id.
2. Write a program to define two interfaces UGC and AICTE both having a default method
int getAdmission() to take the admission and an abstract method String payFee().
getAdmission() in UGC must ask the percentage in qualifying exam and if the percentage >= 60 then generate the registration number and return.
getAdmission() is AICTE must ask the user to join the counseling after 5 days and display
the date of counseling and return the counseling token number.
Create a class University which inherits both UGC and AICTE and overrides the getAdmission() method only such that it will ask the percentage and if direct admission through UGC is possible then proceed otherwise proceed through AICTE.
University must have attribute fee_due and it should be assigned the due amount accordingly.(E.g fee through UGC is 25000 & fee through AICTE is 34000)
Create a class LPU which inherits University and overrides all the methods. Ask the user to deposit the fee and display the fee due. After depositing the fee display the remaining due fee and return the receipt number.
3. Write a program to create a class named IPL _Team with appropriate attributes for team name, wicketkeeper, allrounder and captain. Provide a constructor to initialize all the attributes.
Player is a private nested class with attributes player name, price and a suitable constructor to initialize the attributes.
In main class, create at least 3 teams each having a captain and a wicket-keeper and at least one all-rounder and store the teams in an arraylist.
Implement a method which displays the name of the team and details of all the players of that
team whose captain is having highest price.
4. Create a class Laptop with attributes model_number, price and RAM.
In main class prompt the user to filter on the basis of model, price or RAM and if user selects Price then display all the laptops in descending order of the price and if user selects RAM then display all the laptops in ascending order of their RAM and if user select model then ask to enter the keyword for model and display all the laptops which contain that keyword in model_number.
Answer for the first question : Correct the code if any necessary.
ReplyDeleteclass Voter
{
String name;
String dob;
int id;
Integer age;
//boolean card;
Voter(String names , String dobs , int ids , Integer ages)
{
name = names;
dob = dobs;
age = ages;
if(age > = 18)
{
id= ids;
}
// card = cards;
}
class Voter_Card
{
boolean status;
String votername;
int voterid;
Voter_Card(String voternames , int votersid , boolean statuss)
{
votername = voternames ;
voterid = votersid ;
status = statuss;
}
}
public void display()
{
System.out.println(votername+ "\t" + voterid +"\t"+dob+"\t"+age+"\t"+status+"\t");
}
}
class main
{
public static void main(String...rtk)
{
Treeset ts = new Treeset();
Voter obj = new Voter("Raj" , "04/04/1998" , 11605461 , 18);
Voter obj1 = new Voter("Srinjay" , "05/06/1999" , 11605641 , 17);
Voter obj2 = new Voter("Dam" , "06/05/1997" , 11605879 , 19);
ts.add(obj) ; ts. add(obj1) ; ts.add(obj2);
Iterator i = new iterator();
int a=2;
while(i.hasNext())
{
Voter e = e.next();
if(e.age >= 18)
{
namess = e.name;
idss = e.id;
Voter.Voter_Card obj4 = new Voter.Voter_Card(namess , idss, true);
}
e.display();
}
}
}
Can u please send 2nd question answer
Delete2nd one answer pls
DeletePlss send me 2nd one answer plssss
Delete2nd que answer please
DeleteCan anyone please tell me how can i make the CODE FOR THE 3rd QUESTION CORRECT?::
ReplyDeleteclass IPL_Team
{
String name , wck , alrnd , cpt;
IPL_Team(String names , String wicky , String allround , String captain)
{
name = names;
wck = wicky;
alrnd = allround;
cpt = captain;
}
private Player
{
String pname ;
Integer price;
Player(String playername , Integer pricee)
{
pname = playername;
price = pricee;
}
}
Player obj4 = new Player("Vicky",12000);
Player obj5 = new Player("Vikas",15000);
Player obj6 = new Player("Varun",9000);
public void display()
{
System.out.println(name + "\t" + wck + "\t" + alrnd + "\t" +cpt+"\t");
}
}
class main
{
public static void main(String...rtk)
{
TreeSet ts =new TreeSet ((x,y)->y.price.compareTo(x.price)); //specifically calling the compareTo function to perform sorting mechanism.
IPL_Team obj1 = new IPL_Team("Draco" , "Dhoni" , "Umesh" , "Vicky");
IPL_Team obj2 = new IPL_Team("Dignitas" , "Mahi" , "Rahul" , "Vikas");
IPL_Team obj3 = new IPL_Team("Faze" , "Konak" , "Satir" , "Varun");
ts.add(obj1) ; ts.add(obj2) ; ts.add(obj3);
Iterator i = ts . iterator();
while(i.hasNext())
{
IPL_Team t = i.next();
t . display();
break;
}
}
}
Write a code 2nd question
DeletePlsss need code for 2ndone
DeleteAnyone pls write the program from 4th question
ReplyDeletehave you done this 4th question or you still want answer for it? i can do it for you id u want
Delete
ReplyDeleteThank you for your post. This is excellent information. It is amazing, I wonderful to visit your Blog.
iphone job Oriented course
Mobile App Training Institutes
Plss answer me for 2nd one
DeletePlss
Deleteplease give me 2nd que aswer
DeleteHello Everybody,
ReplyDeleteMy name is Mrs Sharon Sim. I live in Singapore and i am a happy woman today? and i told my self that any lender that rescue my family from our poor situation, i will refer any person that is looking for loan to him, he gave me happiness to me and my family, i was in need of a loan of S$250,000.00 to start my life all over as i am a single mother with 3 kids I met this honest and GOD fearing man loan lender that help me with a loan of S$250,000.00 SG. Dollar, he is a GOD fearing man, if you are in need of loan and you will pay back the loan please contact him tell him that is Mrs Sharon, that refer you to him. contact Dr Purva Pius,via email:(urgentloan22@gmail.com) Thank you.
your blog is nice.thank you
ReplyDeletevisit
web programming tutorial
welookups.com
Pls help me for 2nd question
Deletei need 2 nd que answer
DeleteI wish to show thanks to you just for bailing me out of this particular trouble.As a result of checking through the net and meeting techniques that were not productive, I thought my life was done.
ReplyDeletefull stack developer training in chennai
It is very good and useful for students and developer . Learned a lot of new things from your post. Thank you so much.
ReplyDeleteGoogle Cloud Platform Training in Hyderabad
ReplyDeleteHello! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.
Best AWS Training in Chennai | Amazon Web Services Training in Chennai
AWS Training in Chennai | AWS Training Institute in Chennai Velachery, Tambaram, OMR
AWS Training in Chennai |Best Amazon Web Services Training in Chennai
AWS Training in Velachery | Best AWS Course in Velachery,Chennai
The blog was absolutely fantastic, Lot of information is helpful in some or the other way. Keep updating the blog, looking forward for more content…. Great job, keep it up
ReplyDeleteTutor Jobs in Delhi | Home Tutors in Delhi
Plsss help me for 2nd question
DeleteWould you like to get beginning with these tools for free or talk to anyone about search engine marketing? toprankingseo.net's marketing tools have everything you need is clear. visit our site and see more monthly and weekly packages for SEO And (SEM) search engine marketing . I sure that every person like this my company tool.
ReplyDeleteAnd indeed, I’m just always astounded concerning the remarkable things served by you. Some four facts on this page are undeniably the most effective I’ve had.
ReplyDeleteDotnet Training in Chennai | NO.1 Dotnet Training in Chennai
Android Training in Chennai |NO.1 Best Android Training in Chennai
CCNA Training in Chennai | NO.1 CCNA Training in Chennai
MCSE Training in Chennai | NO.1 MCSE Training in Chennai
Embedded Systems Training in Chennai |NO.1 Embedded Systems Training in Chennai
Matlab Training in Chennai | NO.1 Matlab Training in Chennai
C C++ Training in Chennai | NO.1 C C++ Training in Chennai
Please give me the answer of second question
ReplyDeleteHello bro, if you got the answer of second one then please send me bro...
Deleteon this email "adityarajarya111@gmail.com...
ReplyDeleteIts a wonderful post and very helpful, thanks for all this information.
MCSE Training in Noida
This comment has been removed by the author.
ReplyDeleteGood Post! Thank you so much for sharing the post, it was so good to read and useful to improve
ReplyDeleteJava Training in Electronic City
can anyone tall code for 2nd question..???
ReplyDeleteI want 2ñd question answer plssss
DeleteHelp me for 2nd question plss
Deleteguys please help me , i need code for 2nd question...
ReplyDeleteI need took plss help me
Deletehave you got
Deletedoes any one have 2nd question code
ReplyDelete10 question ans
ReplyDeleteAnswer 1:
ReplyDelete/*2. Write a program to create a class Voter which contains attributes name, date_of_birth and voter_id and voter has a
Voter_Card. Provide appropriate constructor to initialize all the attributes of the Voter but voter id must be assigned
automatically only when the age of the voter is greater than or equal to 18 years.
VoterCard is a nested class with attributes voter_id and Voter_name. Make sure that voter card is created only when user
is a valid voter and if it is already created then must not be assigned the new voter id.
*/
import java.util.*;
class Voter{
String name;
String dob;
int id;
Integer age;
Voter.Voter_Card votercard;
//boolean card;
Voter(String names , String dobs , int ids , Integer ages){
name = names;
dob = dobs;
age = ages;
if(age >= 18)
id= ids;
// card = cards;
}
class Voter_Card{
boolean status;
String votername;
int voterid;
Voter_Card(String voternames , int votersid , boolean statuss){
votername = voternames ;
voterid = votersid ;
status = statuss;
}
public void display(){
System.out.println(name + "\t" + id +"\t"+dob+"\t"+age+"\t"+status+"\t");
}
}
public void display(){
if (votercard == null)
System.out.println(name + "\t" + dob + "\t"+age+"\t"+"\tvoter card not assigned!");
else
votercard.display();
}
}
class main{
public static void main(String...rtk){
List voters = new ArrayList();
voters.add(new Voter("Aman" , "14/09/1998" , 11703461 , 17));
voters.add(new Voter("Shanu" , "25/07/1997" , 11705941 , 18));
voters.add(new Voter("Sumit" , "17/04/1999" , 11804569 , 19));
int a=2;
for (int i=0; i= 18)
{
String namess = voters.get(i).name;
int idss = voters.get(i).id;
voters.get(i).votercard = voters.get(i).new Voter_Card(namess , idss, true);
}
voters.get(i).display();
}
}
}
pls upload the answer for second question
ReplyDeleteThanks for sharing this practice set of Java, as a java developer I suggest every company looking to Hire Java Developers then you must aware about the basics of Java Development.
ReplyDeleteplzz anyone help me in question 10 plzz give me code plz
ReplyDeleteWe are Hire Java DevelopersHire Programmers will provide dedicated freelance java developers/programmers to build a effective team to client businesses.
ReplyDeleteGood post and thank you for posting Ethical hacking Online Training
ReplyDeleteThank you for sharing this post.
ReplyDeleteSAP Training in Chennai
Hardware and Networking Training in Chennai
Cloud Computing Training in Chennai
Pearson Vue Exam Center in Chennai
Oracle Training in Chennai
.Net Training in Chennai
Java Training in Chennai
Software Testing Training in Chennai
AWS Training in Chennai
CCNA Training in Chennai
Hey Nice Blog!! Thanks For Sharing!!!Wonderful blog & good post.Its really helpful for me, waiting for a more new post.keep it up!!!
ReplyDeleteJava training in Chennai
Java Online training in Chennai
Java Course in Chennai
Best JAVA Training Institutes in Chennai
Java training in Bangalore
Java training in Hyderabad
Java Training in Coimbatore
Java Training
Java Online Training
Thank you for the information. It is very useful and informative.
ReplyDeleteangular js training in chennai
angular training in chennai
angular js online training in chennai
angular js training in bangalore
angular js training in hyderabad
angular js training in coimbatore
angular js training
angular js online training
Thank you for your post. This is excellent information. It is amazing, I wonderful to visit your Blog.
ReplyDeleteAWS Course in Chennai
AWS Course in Bangalore
AWS Course in Hyderabad
AWS Course in Coimbatore
AWS Course
AWS Certification Course
AWS Certification Training
AWS Online Training
AWS Training
Good Post! Thank you so much for sharing the post, it was so good to read and useful to improve.
ReplyDeleteacte reviews
acte velachery reviews
acte tambaram reviews
acte anna nagar reviews
acte porur reviews
acte omr reviews
acte chennai reviews
acte student reviews
AI is the future trend of web space development. It is justified as a lot of progress and advancements have been made in the field of Artificial Intelligence. ... One of the latest AI implementation is the grid, which allows web development a simple process, and initiates content-based development.keep up!!
ReplyDeleteAndroid Training in Chennai
Android Online Training in Chennai
Android Training in Bangalore
Android Training in Hyderabad
Android Training in Coimbatore
Android Training
Android Online Training
Superb blog post! And this blog clearly explain about for useful information. I would Thanks for sharing this wonderful content.its very useful to us. Keep it up!
ReplyDeleteSoftware Testing Training in Chennai
Software Testing Online Training in Chennai
Software Testing Courses in Chennai
Software Testing Training in Bangalore
Software Testing Training in Hyderabad
Software Testing Training in Coimbatore
Software Testing Training
Software Testing Online Training
Wonderful blog with great piece of information. Regards to your effort. Keep sharing more such blogs.Looking forward to learn more from you.
ReplyDeleteweb designing training in chennai
web designing training in porur
digital marketing training in chennai
digital marketing training in porur
rpa training in chennai
rpa training in porur
tally training in chennai
tally training in porur
Wonderful blog with great piece of information. Regards to your effort. Keep sharing more such blogs.Looking forward to learn more from you.
ReplyDeletejava training in chennai
java training in annanagar
aws training in chennai
aws training in annanagar
python training in chennai
python training in annanagar
selenium training in chennai
selenium training in annanagar
amazing!! this content was really helpful..u covered everything in a simple yet appealing language ..thanks :))
ReplyDelete| Certification | Cyber Security Online Training Course | Ethical Hacking Training Course in Chennai | Certification | Ethical Hacking Online Training Course | CCNA Training Course in Chennai | Certification | CCNA Online Training Course | RPA Robotic Process Automation Training Course in Chennai | Certification | RPA Training Course Chennai | SEO Training in Chennai | Certification | SEO Online Training Course
We are Hire Programmers offers freelance programmers & Freelance IT Projects at a fraction of cost on the World's Largest Outsourcing Marketplace
ReplyDeleteThanks for sharing keep sharing
ReplyDeleteAngular course
Angular training
Hello.
ReplyDeleteAre you looking for an amazing logo design for your business with 50% off I expect You will be impressed with us.Logo Designers
Blog has informative contents and thanks for sharing this.
ReplyDeletePython Training in Chennai
Python Training in Bangalore
ReplyDeleteThis is really too useful and have more ideas and keep sharing many techniques. Eagerly waiting for your new blog keep doing more.
DevOps Course in Chennai
DevOps Online Course
DevOps Course in Coimbatore
mmorpg oyunlar
ReplyDeleteinstagram takipçi satın al
Tiktok jeton hilesi
tiktok jeton hilesi
antalya saç ekim
İNSTAGRAM TAKİPÇİ SATIN AL
ınstagram takipçi satin al
METİN2 PVP SERVERLER
instagram takipçi satın al
Tül perde modelleri
ReplyDeletesms onay
VODAFONE MOBİL ÖDEME BOZDURMA
nft nasıl alınır
ankara evden eve nakliyat
trafik sigortası
dedektör
web sitesi kurma
aşk kitapları
smm panel
ReplyDeletesmm panel
İS İLANLARİ BLOG
İnstagram Takipçi Satın Al
Hirdavatci burada
beyazesyateknikservisi.com.tr
Servis
Tiktok Hile