100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

COS2614 Assignment 1 2023

Rating
1.5
(2)
Sold
7
Pages
10
Grade
A+
Uploaded on
08-03-2023
Written in
2022/2023

COS2614 Assignment 1 2023 Answers, guidelines, workings and references. ............................................. Question 1 Write a Qt Graphical User Interface (GUI) program to generate a username and an initial password given the full name of the user. Given below are the rules for generating a valid username: • It consists of 5 characters, where the first character is in upper case and the rest of the four characters are in smaller case. • The user name is created by combining the first 4 characters of the surname with the first character of the first name. • If the surname does not have 4 characters, more characters are taken from the first name to make up the user name. • If the surname and the first name combined is less than 5 characters then append sufficient number of 0s to create the username. An initial password is generated by combining randomly selected 5 characters from the full name of the user. Note than no spaces are allowed in the username or password. User input should be obtained using a QInputDialog. You can expect the full name as a single string where each word is separated using a space. For example: Mike William Owen. The output (username and password) should be displayed using a QMessageBox. You need not do any verification of the user input. Question 2 Implement the following classes in the UML class diagram according to the description that follows: A product is described using a name, a price and a supplier. The supplier and the manufacturer can be the same for a product. A Product is initialised using a name and a price. The supplier details are set using the function setSupplier(), which invokes the suitable function of Vendor to set the details of the vendor. If one requests a product for its manufacturer, it returns the name of the vendor stored in m_Supplier, if it is set as the manufacturer. Otherwise an Unknown string is returned. toString() of Vendor returns a string representation of the values of its data members in a readable format. toString() of Product always returns a string representation of a product. If supplierDetails in toString() of Product is true, it returns both the supplier and product details. Otherwise only product details are returned. Implement it as a console application, where the product and supplier details are entered from the keyboard. Display the results of getManufacturerName() and toString()(for both true and false parameter values) on the console.

Show more Read less
Institution
Course








Whoops! We can’t load your doc right now. Try again or contact support.

Connected book

Written for

Institution
Course

Document information

Uploaded on
March 8, 2023
Number of pages
10
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

COS2614
Assignment 1 2023

(Complete Program Files Included)

Due Date: 26 May 2023


Solutions, Explanations, workings, and references




+27 81 278 3372

Reviews from verified buyers

Showing all 2 reviews
1 year ago

2 year ago

1.5

2 reviews

5
0
4
0
3
0
2
1
1
1
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
VarsityC AAA School of Advertising
Follow You need to be logged in order to follow users or courses
Sold
28681
Member since
8 year
Number of followers
13258
Documents
3117
Last sold
5 days ago

4.1

2819 reviews

5
1490
4
581
3
392
2
117
1
239

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions