Will estimate emotional state of some user

Assignment Help Basic Computer Science
Reference no: EM13686731

Imagine, that you work for Facebook and you are to write a program that will estimate emotional state of some user. The only information you have about the user is the latest message he posted (a message is just some string). You know that people use smileys (for example, :-) or :-( ) a lot in their communications and you have the following idea: you want to count how many open and closed parentheses does the message contain and then if there are more open parentheses '(', then the person is sad
and if the message contains more closed parentheses ')', then the user is happy. But unfortunately, not all messages have enough parentheses to make a conclusion which will be trustworthy. If the message has less than 5 parentheses (total), you cannot make a good conclusion on user's mood.
So, to implement this idea you need to write a Java program, that asks user to enter a message (a message is just a string, one line of text that can contain spaces). Then your program should count how many open '(' and closed ')' parentheses does the message contain. If the total number of parentheses (open and closed together) is less than 5, then you need to print back the message "User's mood cannot be determined.", otherwise if the message contains more open parentheses '(' you need to print back the message "The user is sad.", if there are more closed parentheses ')' you need to print a message "The user is happy.", and _nally if you have the same number of open and closed parentheses you need to print "The user is calm."

Reference no: EM13686731

Questions Cloud

Find what current flows in the resistor : A 760 Ω resistor is connected to a variable-voltage power supply. Find what current flows in the resistor when the voltage is 16 Volt
Customer surplus when the price is set to marginal cost : A natural monopoly has a cost function c (q) = 400 + 25q and market demand D (p) = 200 - 2p. What are the monopoly's profit, output, and customer surplus when the price is set to marginal cost? Average cost?
Obtain what the speeder speed with respect to the ground : A speeder is pulling directly away and increasing his distance from a police car that is moving at 29 meter per second with respect to the ground. Obtain the speeder speed with respect to the ground
What are the equilibrium quantity and price in this market : Presume demand and supply are given by Qd = 50 - P and Qs = 0.5P - 10. What are the equilibrium quantity and price in this market? Decide the quantity supplied, the quantity demanded and the magnitude of the surplus if a price floor of $48 is imposed..
Will estimate emotional state of some user : Will estimate emotional state of some user
Economy was on the verge of an expansion period : According to the Wall Street Journal, merger and acquisition activity in the first quarter of 2004 rose to 5.3 billion- an investment level not seen since the second quarter of 2001. Approximately three fourths of the 78 first quarter deals occurred ..
Estimate the work function of this material : Upon being struck by 240 nm photons, a material ejects electrons with a maximum kinetic energy of 1.44 eV. Estimate the work function of this material
Determine what is the heater resistance : A current of 11.4 Amp flows through an electric heater operating on 220 Volt. Determine what is the heater resistance
Determine what is the height of its image : An 4 millimeter tall object is 21.5 centimeter from the center of a silvered spherical glass Christmas tree ornament 5.50 centimeter in diameter. Determine what is the height of its image

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is the standard iana-registered higher-level

How could you determine whether or not a TCP service is running at port 13 of a given Internet host? Test this for the host(s) assigned by your instructor. What is the standard IANA-registered higher-level protocol associated with this port?

  Decryption algorithm: reverse the encryption algorithm

Decryption algorithm: Reverse the encryption algorithm. The permutation, however, should (circular) shift the bit pattern by 1 bit to the right

  Create a console-based program and a gui application

Create a console-based program and a GUI application

  Our model assumes that the arrival distribution of customers

In the McBurgers simulation, our model assumes that the arrival distribution of customers is the same throughout the entire day. Do you think this is a realistic assumption? If not, explain how you could modify the model to make it a better repres..

  Write pseudocode for an iterative algorithm

Write pseudocode for an iterative algorithm that determines a DFS spanning tree for an undirected graph. Base your algorithm on the traversal algorithm dfs.

  Explain the difference between data, information

Explain the difference between data, information, and Business Intelligence and give specific examples.

  What specific data about the entities will need to be stored

The system will need to record data about what entities? What specific data about the entities will need to be stored?

  Draw dfsa for identifiers contain only letters and digits

Draw a DFSA for identifiers that contain only letters and digits, where the identifier must have at least one letter, but it need not be the first character. Hint: everything to the left of the leftmost letter must be a digit.

  Create a new query to list the model name

Create a new query to list the model name

  Determining minimum size of control bus

Determine the minimum size of the control bus?

  Two cyborgs walk into your home

Two cyborgs walk into your home, both claiming to be oracles for the graph 3-colorability decision problem. They both always give a yes/no answer in constant time for any instance, and are each self-consistent

  Use propositional logic to prove

Use propositional logic to prove

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd