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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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