Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

End of Semester 1, 2016 COMP1001 Object Oriented Program Design QUESTION FOUR 20 Marks. For the purposes of this question, assume that you have access

image text in transcribed

End of Semester 1, 2016 COMP1001 Object Oriented Program Design QUESTION FOUR 20 Marks. For the purposes of this question, assume that you have access to a class called Awning. This class is used to describe all types of awnings. You should assume that the Awning class has all the constructors, accessors and mutators as emphasised in the lecture examples and the worksheet exercises. Design a class called Caravan. Objects of this class are used to describe a caravan and are responsible for the following information: brand: A string containing the manufacturer's brand. awning: An Awning object that is used to describe the awning installed in the caravan. length: A real number in the range 4.0 to 10.0 which specifies the length of the caravan in meters. Two Caravan objects are considered equal if and only if they have the same brand, awning and length. Your design must include all of the good features that have been discussed in the lectures and worksheet exercises. Hint: you should use one mutator for updating all of the state information. Also you may leave out the alternate constructor and the toString accessor. Marks will be allocated for completeness and conformation to best practices. (20 marks ] End of Semester 1, 2016 COMP1001 Object Oriented Program Design QUESTION FOUR 20 Marks. For the purposes of this question, assume that you have access to a class called Awning. This class is used to describe all types of awnings. You should assume that the Awning class has all the constructors, accessors and mutators as emphasised in the lecture examples and the worksheet exercises. Design a class called Caravan. Objects of this class are used to describe a caravan and are responsible for the following information: brand: A string containing the manufacturer's brand. awning: An Awning object that is used to describe the awning installed in the caravan. length: A real number in the range 4.0 to 10.0 which specifies the length of the caravan in meters. Two Caravan objects are considered equal if and only if they have the same brand, awning and length. Your design must include all of the good features that have been discussed in the lectures and worksheet exercises. Hint: you should use one mutator for updating all of the state information. Also you may leave out the alternate constructor and the toString accessor. Marks will be allocated for completeness and conformation to best practices. (20 marks ]

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_2

Step: 3

blur-text-image_3

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

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

2. Be tactful, but dont avoid talking about tough issues.

Answered: 1 week ago