Question: Question Completion Status Classroom classNumberint capacity int + classroom + Classroom (n:int, cint) + setNumberin: Int); void + setcapacity cint): void +BetNumber: int getCapacity: int

 Question Completion Status Classroom classNumberint capacity int + classroom + Classroom

Question Completion Status Classroom classNumberint capacity int + classroom + Classroom (n:int, cint) + setNumberin: Int); void + setcapacity cint): void +BetNumber: int getCapacity: int 1. Write a class declaration for Classroom class and add the two variables to the class declaration classNumber: is an int variable that holds the classroom number Capacity: is an int variable that holds the number of chairs the classroom can fit. 2. The bass should have the following constructors: A constructor that accept the following value as argument and assigned to the appropriate fields classroom number and capacity Ano-are constructor that assigns to the classroom number and to the capacity sed 3. Wilt mutator methods that store values in these selds and accessor methods that return the values in these fields as in above UML diagram Once you have written the class, write a separate program that creates a Classroom objects to hold the following data: classlumber 103 capac 20 TOR 12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!