Question: java The Table class, which contains: A private data field named table_number. A private data field named capacity to represent the maximum number of persons
The Table class, which contains: A private data field named table_number. A private data field named capacity to represent the maximum number of persons the table can accommodate. Set the default value for this field to be 4 . - A private data field named minimum_spend to represent the minimum amount customers need to spend at that table. - A private data field named vip_table which indicates whether a table is a VIP table or regular table. - A private table_count data field that tracks the number of tables created. This field is shared by all class members. The default is 0 . Every time a table is created, this number should increment. A no-arg constructor that increments the data field table_count, and uses the table count as a table_number for the created table. A constructor that creates a table with the specified capacity and minimum spend (constructor arguments). This constructor should not take table ID as an argument. Instead, like the no-arg constructor, it increments the data field table_count, and uses the table count as a table_number for the created table. - Create getter and setter methods (accessors and mutators) for all data fields. Do not create a setter for table_count
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
