Question 1 Consider the following incomplete UML class diagram. Widget Film title: QString - length: int director String

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Question 1 Consider the following incomplete UML class diagram. Widget Film title: QString - length: int director String

Post by answerhappygod »

Question 1 Consider The Following Incomplete Uml Class Diagram Widget Film Title Qstring Length Int Director String 1
Question 1 Consider The Following Incomplete Uml Class Diagram Widget Film Title Qstring Length Int Director String 1 (49.91 KiB) Viewed 29 times
using Qt creator
Question 1 Consider the following incomplete UML class diagram. Widget Film title: QString - length: int director String - release Date: Date + Film + Filmit: astring, len: int, dir. QString, rd: GDate) + setTitle(t QString) + setLength(len: int) + setDirector(dir: QString) + setRelease(rd: Date) + getTitleX String + getLength: int getDirector: String + getRelease(): QDate + obtainFilmData() + SaveFilm[f: Film) The Film class takes on too much responsibility. 1. obtainFilmData(), which is used to get user input on film details (title, length, director and release date) via a Graphical User Interface (GUI), and 2. saveFilmi), which is used to save the state of a Film instance to a file. 2 2 COS3711/Assignment 1/2022 Redesign the Film class so that the functionality currently included in it can be achieved using three different classes. 1. The Film class to represent a film with the necessary functions (as given in the above UML class diagram). 2. A FilmWriter class which saves the state of a Film instance (values of the data members of that instance) to a file (you may save it in any sensible format that is human-readable). 3. A Graphical User Interface (GUI) class Filminput, which allows users to enter film information to create Film instances as well as to save Film instances to file (using the Filmwriter). Note: You can decide when Film instance(s) should be saved. Question 2 Make necessary changes in the Film class so that you can access the data members of Film instances using ometaObject. Rewrite the Filmwriter class so that the state of a Film instance is accessed using the generated Metaob ect.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply