Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve it using C# , the selution should include three parts tiktok and tiktokManager and test .. thank you Due: Submission date will be

Please solve it using C# , the selution should include three parts tiktok and tiktokManager and test .. thank you

image text in transcribedimage text in transcribed

image text in transcribed

image text in transcribedimage text in transcribed

Due: Submission date will be decided by your instructor. Recommended due date at the end of week 6. TikTok is a video-sharing social networking service owned by BvteDaace, a Chinese company founded in 2012 by Zhang Yiming. It is used to create short dance, lip-sync, comedy and talent videos... As of 2018 , TikTok has been made available in over 150 markets, and in 75 languages. TikTok was downloaded more than 104 million times on Apple's App store during the full first half of 2018, according to data provided to CNBC by Sensor Tower. It surpassed Facebook, YouTube and Instagram to become the world's most downloaded iOS app (https://en.wikipedia.org/wiki/TikTok). This assignment attempts to model this social phenomenon. It involves an goum and two main classes: Audience, TikTok and Jiktoklanager You will load a set of tikeks from a local file into a List collection. You will perform some simple queries on this collection. The Jikok and the TikekUadagec classes must be in separate files and must not be in the PCegcem. Ss file. The Audience goum may be implemented in the Tutek.s5 file. The Audience Enum 4 Marks This epum specifies the intended audience for this tiktgk. It consists of three constants as shown in the table below: The TikTok Class 23 Marks The TikTok class consist of ten members that include two static ones (the members decorated with the $ symbol). You will implement this and all of the classes in Visual Studio. A short description of the class members is given below: The $ symbol is used to denote that this member belongs to the type rather than a specific object and you must use the type to access that member. Fields: 1. _ID - this private field is a class variable, it represents the number to be used in setting the id of this item. Properties: All of the properties are cegdeply and are self-explanatary. 1. Originator - this property is a string representing the ariginator of this tjkek the getter is public and the setter is absent. 2. Length - this property is an int representing the length in second recipient of this tjkek The getter is public and the setter is absent. 3. HashJegg- this property is a string representing the hashtag of this tikak. The getter is public and the setter is absent. 4. Audience - this property is a string representing the distribution of this tikak. The getter is public and the setter is absent. 5. Id - this property is a string representing the id of this tikeg. The getter is public and the setter is absent. This is used to uniquely identify a tjkek Methods: 5 marks 1. public IikTokfstring originator, int length, string basfjego Audience audience) - This public canstructor takes four string parameters. This constructor does the following: a. Assigns the arguments to the apprapriate properties. b. Sets the Id property using the class variable ID. c. After the Id property is set, the ID is then incremented so that the next assignment will be unique. \{see description of ld above\} 4 marks 2. private Iiktokfstring id, string originator, int length, string bashJag, Audlence audience) - This public constructor takes five string parameters. This is called by the static TikTok. Parse(string) method. This canstructor does the following: a. Assigns the arguments to the appropriate properties. Methods: 2 marks 1. public override string Tostring() - This methad overrides the same methad of the Object class. It does not take any parameter but return a string representation of itself. You decide on the format for the output. 6 marks 2. public static TikTok Parsefstring line) - This is a public class method that takes a string argument and returns a TikTok object. It is used to create a TikTok object when laading the JikTgbtfrom a file. The argument represents a single line of input read fram the file. This method daes the following: a. Uses the methad of the string class is to chunk the input into four strings. The b. Invakes the five arguments constructor. Because all the arguments are string, it is parameter. This constructor does the following: easy to inter-change the order. You need to examine the text file to make sure a. Initialize the TIKTOKS field to a new list of tikfok that you are sending the arguments to the constructor in the required order. b. Opens the file specified by the filename field for reading c. Return the result of the above invocation c. Using a looping structure it does the fallowing: i. Reads one line from the file. ii. Passes this line to the static Papeef) method of the TikTok class to create a tikfok object. This static class consist of five static members. You will also implement this in Visual Studio. A iii. The resulting object is added to the tikok collection. short description of the class members is given below: iv. This is repeated until the input fram the file is empty (nu11). 2marks following: a. Assigns the TIKOKS field b. Creates about 5 tjkfeks objects and add them to the tikfok collection. 2 marks 3. public static void Show() - This is a public class method that does not take any argument that does nat return This is good example of methad 2 marks 4. public static void Show(string tag) - This is a public class method that takes a string argument that does not retum a value. It displays all the tiksokswith basktag matching the argument. This comparison must be case in-sensitive. 2 marks 5. public static void Show(int length) - This is a public class method that takes an int argument that does not retum a value. It displays all the tikfoks with length greater than the argument. 2 marks 6. public static void Show(Audience audience) - This is a public class methad that takes an int argument that does not return a value. It displays all the tjkfokshith ALL MEMEERS ARE STATIC! audience matching the argument. Fields: ark 1. TIKTOKS - this private field is a class variable; it is a collection of all the tjkfoksin the system. It is initialized and populated in the static constructar. 2 marks Testing 2 Marks 2. FILENAME - this private field is a class variable; it represents the name of the file that In your test harness (the Main\{) method in the Program Class), write the code to test all the contains all the tikokn it is used in the static constructor to read in the tikfoks You will methods of the JWhab-akadoc class including the Initia1ize() method. have to set this to the name of file that has the information about the fjkegks Methods: A static constructor daes not tabe any arguments, nor daes it require any accessibility modifier. botrgkpecifying one will raise a compiler error it is called before ary member is accessed and never ever again

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions