Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
101 views5 pages

Assignment-1 Name of Student: Batch: Branch: Roll No Problem Statement

The document provides details for an assignment to create a Participant class for a dance club audition. It includes: - The Participant class contains attributes like registrationId, name, contactNumber, branch. - The constructor initializes name, contactNumber, branch and generates a unique registrationId starting from D1001 that increments with each new Participant. - Getter and setter methods need to be implemented for the attributes. - The code needs to be tested by creating Participant objects and validating the attribute values are set correctly. Sample input/output is provided.

Uploaded by

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

Assignment-1 Name of Student: Batch: Branch: Roll No Problem Statement

The document provides details for an assignment to create a Participant class for a dance club audition. It includes: - The Participant class contains attributes like registrationId, name, contactNumber, branch. - The constructor initializes name, contactNumber, branch and generates a unique registrationId starting from D1001 that increments with each new Participant. - Getter and setter methods need to be implemented for the attributes. - The code needs to be tested by creating Participant objects and validating the attribute values are set correctly. Sample input/output is provided.

Uploaded by

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

Assignment-1

Name of Student:

Batch: Branch: Roll No

Problem Statement
A VIT Melange committee is conducting auditions to admit interested
candidates. You need to implement a Participant class for the dance club
based on the class diagram and description given below.

C-Participants

 counter: int
 registrationId: String
 name: String
 contactNumber: long
 branch: String
C
o Participant(name:String,contactNumber:long,branch:String)
o getRegistrationId(): String
o getCounter(): int
o setCounter(counter:int):void
o getName():String
o setName(name:String):void
o getContactNumber():long
o setContactNumber(contactNumber:long):void
o getBranch():String
o setBranch(branch:String):void

Method Description
Partcipant(String name, long contactNumber, String branch)
 Initialize the name, contactNumber and branch instance variables
appropriately with the values passed to the constructor.
 Generate the registrationId using the static variable counter. 
 The value of registrationId should start from 'D1001' and the
numerical part should be incremented by 1 for the subsequent
values. 
 Initialize the counter in static block.
Implement the appropriate getter and setter methods.
Test the functionalities using the provided Tester class. Create two or
more Participant objects and validate that the values of the member
variables are proper.
Sample Input and Output
For constructor
Input
For first Participant object

Parameters Values
name Rohit
contactNumber 1234567889
branch Computer

For second Participant object

Parameters Values
name Sayli
contactNumber 1988612300
branch Mechanical

Expected Output

Hi Rohit! Your registration id is D1001


Hi Sayli! Your registration id is D1002

Add your Code Here


Add your code here
Add your code here
Results:
Actual Output

You might also like