100% Zufriedenheitsgarantie Sofort verfügbar nach Zahlung Sowohl online als auch als PDF Du bist an nichts gebunden
logo-home
COS3711 Assignment 2 2024 | Due 18 July 2024 2,70 €   In den Einkaufswagen

Prüfung

COS3711 Assignment 2 2024 | Due 18 July 2024

 86 mal angesehen  11 mal verkauft
  • Kurs
  • Hochschule

Study the following UML class diagram: The UML class diagram is an initial design of classes for a conference registration application. There are three types of registration allowed for the conference: standard registration, student registration and invited guests registration. The standard reg...

[ Mehr anzeigen ]

vorschau 3 aus 23   Seiten

  • 25. juni 2024
  • 23
  • 2023/2024
  • Prüfung
  • Fragen & Antworten
avatar-seller
, PLEASE USE THIS DOCUMENT AS A GUIDE TO ANSWER YOUR ASSIGNMENT


Please note that the author of this document will not responsibility for any plagiarizing you
commit.

 Question 1

Study the following UML class diagram:




The UML class diagram is an initial design of classes for a conference registration application.
There are three types of registration allowed for the conference: standard registration, student
registration and invited guests registration. The standard registration fee is the standard fee
(stored in STANDARD_FEE). For those registered as students, the conference fee is half the
price of the standard registration fee. For those registered as guests, the conference fee is 10% of
the standard registration fee.

An instance of RegistrationList contains a list of Registration*. No two registrations are allowed
to have attendees with the same e-mail addresses, unless the names are different. You should be
able to query a RegistrationList whether a person (by the name) is already registered for the
conference. A RegistrationList can also return the number of attendees that are registered for
the conference from an institution. Similarly, you can request the total registration fees for a
type (“Registration”, “StudentRegistration”, “GuestRegistration” or “All”) of registration. You
are expected to use Qt’s metaobject system to access the type of a Registration in
RegistrationList.

Write a GUI application that allows users to register for a conference. The GUI should display
the current list of registrations, including the respective registration fees, in the RegistrationList
at all times, using a table widget. The interface should also allow users to request and view the
results of the various operations supported by the RegistrationList class.

You are allowed to add new features to the classes given in the UML diagram, although you are
not allowed to delete or change the given functions. You can decide on the design of the GUI, and
it can be done manually or using Qt Designer. You are expected to follow good programming
principles.

, Classes based on the UML Diagram:
 `Person`
 `Registration`
 `StudentRegistration`
 `GuestRegistration`
 `RegistrationList`

GUI Design:
 A table to display the list of registrations.
 Forms to allow users to input registration details.
 Buttons to add new registrations and perform various queries.

Implementation of the Registration Logic:
 Calculating fees based on the type of registration.
 Ensuring unique email addresses for attendees.

Step 1: Define the Classes
We'll start by defining the classes based on the UML diagram.

CODE
#include <QString>
#include <QDate>
#include <QList>

// Person Class
class Person {
private:
QString m_Name;
QString m_Affiliation;
QString m_Email;

public:
Person(QString n, QString a, QString e) : m_Name(n), m_Affiliation(a), m_Email(e) {}
QString getName() const { return m_Name; }
QString getAffiliation() const { return m_Affiliation; }
QString getEmail() const { return m_Email; }
QString toString() const {
return "Name: " + m_Name + ", Affiliation: " + m_Affiliation + ", Email: " + m_Email;
}
};

// Registration Class
class Registration {
protected:
static const double STANDARD_FEE;
Person m_Attendee;
QDate m_BookingDate;

public:
Registration(Person p) : m_Attendee(p), m_BookingDate(QDate::currentDate()) {}
Person getAttendee() const { return m_Attendee; }

Alle Vorteile der Zusammenfassungen von Stuvia auf einen Blick:

Garantiert gute Qualität durch Reviews

Garantiert gute Qualität durch Reviews

Stuvia Verkäufer haben mehr als 700.000 Zusammenfassungen beurteilt. Deshalb weißt du dass du das beste Dokument kaufst.

Schnell und einfach kaufen

Schnell und einfach kaufen

Man bezahlt schnell und einfach mit iDeal, Kreditkarte oder Stuvia-Kredit für die Zusammenfassungen. Man braucht keine Mitgliedschaft.

Konzentration auf den Kern der Sache

Konzentration auf den Kern der Sache

Deine Mitstudenten schreiben die Zusammenfassungen. Deshalb enthalten die Zusammenfassungen immer aktuelle, zuverlässige und up-to-date Informationen. Damit kommst du schnell zum Kern der Sache.

Häufig gestellte Fragen

Was bekomme ich, wenn ich dieses Dokument kaufe?

Du erhältst eine PDF-Datei, die sofort nach dem Kauf verfügbar ist. Das gekaufte Dokument ist jederzeit, überall und unbegrenzt über dein Profil zugänglich.

Zufriedenheitsgarantie: Wie funktioniert das?

Unsere Zufriedenheitsgarantie sorgt dafür, dass du immer eine Lernunterlage findest, die zu dir passt. Du füllst ein Formular aus und unser Kundendienstteam kümmert sich um den Rest.

Wem kaufe ich diese Zusammenfassung ab?

Stuvia ist ein Marktplatz, du kaufst dieses Dokument also nicht von uns, sondern vom Verkäufer Aimark94. Stuvia erleichtert die Zahlung an den Verkäufer.

Werde ich an ein Abonnement gebunden sein?

Nein, du kaufst diese Zusammenfassung nur für 2,70 €. Du bist nach deinem Kauf an nichts gebunden.

Kann man Stuvia trauen?

4.6 Sterne auf Google & Trustpilot (+1000 reviews)

45.681 Zusammenfassungen wurden in den letzten 30 Tagen verkauft

Gegründet 2010, seit 14 Jahren die erste Adresse für Zusammenfassungen

Starte mit dem Verkauf
2,70 €  11x  verkauft
  • (0)
  Kaufen