Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using java Q5. Open the codepad in Bluej and try the following statements. Write the results achieved. a) Java Programming: + 123 b) 27 %

using java

Q5. Open the codepad in Bluej and try the following statements. Write the results achieved.

a) Java Programming: + 123

b) 27 % 4

c) xyz + abc

Q6. Write a method ListAllStudent() from a university Collection.

Hint: Use for each loop

Q7. Draw Class Diagram and Object Diagram from the below given Details.

public class Car

{

private Sedan Model;

private Sedan Price;

}

Q8. Write a declaration of a private field named Department that can hold an ArrayList. The elements of the ArrayList are of type University. Write an assignment to the Department variable to create an appropriate ArrayList objects.

Q9. Create a class MapTester and use HashMap to implement a phonebook

given below:

HashMap phoneBook = new HashMap();
phoneBook.put("Homer Jay Simpson", "(531) 9392 4587"); phoneBook.put("Charles Montgomery Burns", "(531) 5432 1945"); phoneBook.put("Apu Nahasapeemapetilon", "(531) 4234 4418");
Q10. In the HashMap class, implement two methods : public void enterNumber(String name, String number) and 

public String lookupNumber(String name)

The methods should use the put and get methods of the HashMap class to implement their functionality.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

10:16 AM Sun Jan 29 Answered: 1 week ago

Answered: 1 week ago