YugJava4
YugJava4
Experiment 4
Student Name: Yug UID: 22BCS14252
Branch: BE-CSE Section/Group: 639-A
Semester:6th Date of Performance:14/02/25
Subject Name: PBLJ Subject Code: 22CSH-359
1. Aim : Write a program to collect and store all the cards to assist the
users in finding all the cards in a given symbol.This cards game
consist of N number of cards. Get N number of cards details from
the user and store the values in Card object with the attributes
symbol and Number. Store all the cards in a map with symbols as
its key and list of cards as its value. Map is used here to easily
group all the cards based on their symbol. Once all the details are
captured print all the distinct symbols in alphabetical order from
the Map.
3. Code
import java.util.*;
class Card {
String symbol;
String name;
4. Code
5. Learning Outcomes
• Understand how to use maps (dictionaries) for efficient data storage and
retrieval.