تفاصيل المشروع

هاذا وصف المشروع:Problem Set: Tweet Tweet

The purpose of this problem set is to give you practice with test-first programming. Given a set of specifications, you will write unit tests that check for compliance with the specifications, and then implement code that meets the specifications.

Get the code

To get started, download the project code and initialize your repository.

Overview

The theme of this problem set is to build a toolbox of methods that can extract information from a set of tweets downloaded from Twitter.

Since we are doing test-first programming, your workflow for each method should be ( in this order ).

Study the specification of the method carefully.

Write JUnit tests for the method according to the spec.

Implement the method according to the spec.

Revise your implementation and improve your test cases until your implementation passes all your tests.

Your project must adhere to the following:

Your test cases should be chosen using the input/output-space partitioning approach.

Include a comment at the top of each test suite class describing your testing strategy

In order for your overall program to meet the specification of this problem set, you are required to keep some things unchanged:

Don’t change these classes at all: the classes Tweet , Timespan , and TweetReader should not be modified at all .

Don’t change these class names: the classes Extract , Filter , SocialNetwork , ExtractTest , FilterTest , and SocialNetworkTest must use those names and remain in the twitter package.

Don’t change the method signatures and specifications: The public methods provided for you to implement in Extract , Filter , and SocialNetwork must use the method signatures and the specifications that we provided.

Don’t include illegal test cases: The tests you implement in ExtractTest , FilterTest , and SocialNetworkTest must respect the specifications that we provided for the methods you are testing.

Aside from these requirements, however, you are free to add new public and private methods and new public or private classes if you wish. In particular, if you wish to write test cases that test a stronger spec than we provide, you should put those tests in a separate JUnit test class, so that we don’t try to run them on staff implementations that only satisfy the weaker spec. We suggest naming those test classes MyExtractTest , MyFilterTest , MySocialNetworkTest , and we suggest putting them in the twitter package in the test folder alongside the other JUnit test classes.

Below are three problems that you need to distribute for each member in the team to work on:

Problem 1: Extracting data from tweets

In this problem, you will test and implement the methods in Extract.java .

You’ll find Extract.java in the src folder, and a JUnit test class ExtractTest.java in the test folder. Separating implementation code from test code is a common practice in development projects. It makes the implementation code easier to understand, uncluttered by tests, and easier to package up for release.

Devise, document, and implement test cases for getTimespan() and getMentionedUsers() , and put them in ExtractTest.java .

Implement getTimespan() and getMentionedUsers() , and make sure your tests pass.

If you want to see your code work on a live sample of tweets, you can run Main.java . ( Main.java will not be used in grading, and you are free to edit it as you wish.)

Hints:

Note that we use the class Instant to represent the date and time of tweets. You can check this article on Java 8 dates and times to learn how to use Instant .

You may wonder what to do about lowercase and uppercase in the return value of getMentionedUsers() . This spec has an underdetermined postcondition, so read the spec carefully and think about what that means for your implementation and your test cases.

getTimespan() also has an underdetermined postcondition in some circumstances, which gives the implementor (you) more freedom and the client (also you, when you’re writing tests) less certainty about what it will return.

Read the spec for the Timespan class carefully, because it may answer many of the questions you have about getTimespan() .

Commit to Git. Once you’re happy with your solution to this problem, commit to your repo! Committing frequently – whenever you’ve fixed a bug or added a working and tested feature – is a good way to use version control, and will be a good habit to have for your team projects.

Problem 2: Filtering lists of tweets

In this problem, you will test and implement the methods in Filter.java .

Devise, document, and implement test cases for writtenBy() , inTimespan() , and containing() , and put them in FilterTest.java .

Implement writtenBy() , inTimespan() , and containing() , and make sure your tests pass.

Hints:

For questions about lowercase/uppercase and how to interpret timespans, reread the hints in the previous question.

For all problems on this problem set, you are free to rewrite or replace the provided example tests and their assertions.

Commit to Git. Once you’re happy with your solution to this problem, commit to your repo!

Problem 3: Inferring a social network

In this problem, you will test and implement the methods in SocialNetwork.java . The guessFollowsGraph() method creates a social network over the people who are mentioned in a list of tweets. The social network is an approximation to who is following whom on Twitter, based only on the evidence found in the tweets. The influencers() method returns a list of people sorted by their influence (total number of followers).

Devise, document, and implement test cases for guessFollowsGraph() and influencers() , and put them in SocialNetworkTest.java . Be careful that your test cases for guessFollowsGraph() respect its underdetermined postcondition.

Implement guessFollowsGraph() and influencers() , and make sure your tests pass. For now, implement only the minimum required behavior for guessFollowsGraph() , which infers that Ernie follows Bert if Ernie @-mentions Bert.

If you want to see your code work on a live sample of tweets, run Main.java . It will print the top 10 most-followed people according to the social network you generated. You can search for them on Twitter to see if their actual number of followers has a similar order.

يجب انجازه يوم الاربعاء .ويجب الاطلاع على الملف لفهم اليه العمل

تقدم للمشروع

العروض المقدمة

Omran M.

نبذة عني. عمران محمد . مصمم ومطور صفحات أنترنت ،، أعمل على تطوير وتصميم صفحات الآنترنت ومختص أيضا في تطوير سكربت الوردبريس والآبن كارت وأرشفة المواقع وتهيئتها ل...

Reda E.

مرحبا Hamza N. أني مبرمج Java ، لقد عملت من قبل على مشاريع مماثلة تتطلب مهارات في البرمجة بلغة JAVA بموجب المواصفات المحددة. وسأكون سعيدا بمساعدتك في إنجاز الكو...

قبولك لهذا العرض يعتبر اتفاقاً بينك وبين المستقل وسيبقى موقع مستقل وسيطاً بينكما حتى تسليم المشروع. لن تتمكن من تغيير العرض أو إلغائه لاحقًا لذلك تأكد من اختيارك للعرض المناسب باتّباع النصائح التالية:

  • راجع صفحة حساب المستقل الذي اخترته واطّلع على أعماله السابقة
  • إن كانت هناك تفاصيل غير مذكورة في المشروع، فتواصل مع المستقل وأخبره بها أولًا
  • بإمكانك أن تتواصل مع المستقل وتسأله عن أية أمور تحتاجها
  • احرص دائمًا على إبقاء التواصل مع المستقل داخل الموقع قدر الإمكان وذلك لضمان حقوقك
  • لا تتردد من التواصل معنا ان احتجت لأي مساعدة، نحن نحب مساعدتك!

المستقل غير متاح لاستلام مشاريع، يمكنك ارسال تنبيه له لقبول العرض وإعادة المحاولة بعد بضعة ساعات، أو اختيار عرضاً من مستقل آخر.