Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

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 Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

42. Which RAID level uses a mirror (shadow) set?

Answered: 1 week ago

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago