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

  How many orders invoices were shipped

How many orders (invoices) were shipped by Speedy Express?

  What would programs have to do for each type of hardware

If an applications' requests for data did not go through the OS, what would programs have to do for each type of hardware?

  Which languages give the programmer the freedom to choose

Is allowing the programmer this freedom a good language design strategy or not? Take a position and defend it.

  The current network diagram infrastructure

1. Determine which devices you will use for both the current network diagram infrastructure consisting of firewalls, routers, and workstations as well as the device you need to incorporate.

  Normally this representation has a fixed size

Most programming languages have a built-in integer data type. Normally this representation has a fixed size, thus placing a limit on how large a value can be stored in an integer variable.

  Explaining advantages of ansi-tia-eia cabling standards

Discuss in scholarly detail the advantages of the ANSI/TIA/EIA cabling standards.

  Project charter and project management plan

Project Charter and Project Management Plan

  Becoming cluster master and successfully

HCHLock lock, what will happen if the time between becoming cluster master and successfully splicing the local queue into the global queue is too small? Suggest a remedy to this problem.

  Create an employee class

Create an Employee class

  The computerization of health records

A health care issue that has been in the news lately is the computerization of health records. This probability is being approached cautiously because of sensitive privacy and security concerns, among others.

  Write this report addressing

Your supervisor has asked you to draft a brief report that describes the "Internal Use Only" data classification standard of Richman Investments.

  Write a script to help users calculate compressed file size

Develop a small console program driven by a text menu (see the sample screenshot below):? It displays a simple menu with 4 items indicated by number 1-4.? Users will enter number 1 to 4 to run some commands.?

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