Write a program that performs boolean expressions

Assignment Help Basic Computer Science
Reference no: EM13781409

Write a program that performs the following tasks

1) Read in a month and determine the number of days in the month. If the month is February, prompt the user for a year and determine if the year is a leap year to output the correct number of days. (A leap year is divisible by four, except for years with are multiples of 100, which are only leap years if they are also divisible by 400). Your program should accept the month as a 1 or 2 digit number, a three letter abbreviation for the month, or a full month.

2) Given someone's brithday in the form mm/dd, m/dd, mm/d or m/d generates their sign and random advice (from atleast four possibilities).

3) Write the truth tables for the following boolean expressions:

a. A || B && C
b. (A || B) && ! (A && B)

4) Strictly extra credit: Write a compatibility test for an online dating service.

a. Have the two people enter their names.
b. Calculate points as follows:
i.If the two names are the same, they get -1 points and you do not have to check anymore
ii.If the names of the same length add 2 points if the length of one name is 1 more than the other add one point
iii.If the first letters are the same add 1 point
iv.If the last letters are the same add 1 point
v.If the last letter of one name is the same as the first letter of the other add 1 point. (do the same for both names)
vi.Add the int values of the first letter of each name. take the value mod 3 and add it to the total.
vii.Add the int values of the second letter of each name. take the value mod 4 and add it to the total.
c. You should have anywhere from -1 to 11 points. Print off the points and a snarky comment appropriate for each one. Be sure to include their names in the message. Use this list to determine which comment to display:
i.11 points à comment 1
ii.8 to 10 points à comment 2
iii.5 to 7 points à comment 3
iv.2 to 4 ponts à comment 4
v.0 or 1 points à comment 5
vi.-1 points à comment 6
Sample test runs on the next two pages

Reference no: EM13781409

Questions Cloud

Professional public relations practice throughout the world : The need for professional public relations practice throughout the world is increasingly obvious, and those who are now studying public relations in colleges and universities will practice public relations at a time in history when public relations w..
Health policy-overview of theoretical and practical support : Introduce the topic of your proposed new health policy. Include your problem statement and describe the background behind the problem. Show the reader why this issue is important, the rationale as to why the new policy is needed, and what you intend ..
Describe the types of cost-based pricing : Name and describe the types of costs marketers must consider when setting prices. Describe the types of cost-based pricing and the methods of implementing both. Provide examples and a breakeven analysis for a product you are familiar with. If possibl..
Marketing department of a high-end department : Assume you work in a marketing department of a high-end department store. You send out Thank You cards with a short customer satisfaction survey one week after purchase. You wonder if survey response rates would increase significantly from your curre..
Write a program that performs boolean expressions : Read in a month and determine the number of days in the month. If the month is February, prompt the user for a year and determine if the year is a leap year to output the correct number of days.
Write the program vb text as a model : the VB text as a model and write the program so that each group is invisible and becomes visible only when its corresponding check box is checked. After the button is clicked, the amount of the bill should be calculated. NOTE: FIGURE 4.62 IS A DIF..
Verify the correctness of the board content : The mission of this assignment is to implement a "Sudoku game board" and interact with user using a small set of commands that enable to initialize the game board. You program must permit user to see the game board, swap rows,
Create an interface that has two list boxes : Create an interface that has 2 list boxes for i) the weekly hours worked (containing integer values from 35 to 45 inclusive) and ii) the hourly rate of pay (from 9.50 to 14.00 inclusive, in increments of 0.50).
Development and characteristics of abstract expressionism : Discuss the development and characteristics of Abstract Expressionism; be sure to include Gorky, Pollock, and de Kooning in your discussion, using examples of their work as discussed in the text.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Needs to examine and process the string

Needs to examine and process the string

  Evaluating options and developing resolutions

Provide an overview of tasks and key work activities (meetings, training, presentations, etc.) in which you were engaged during the week, with sufficient detail for your instructor to understand what you were involved in.

  What is the difference between using system.data

What is the difference between "using System.Data;" and directly adding the reference from "Add References Dialog Box"?

  Systems administrator of radius implementation

Suppose you are a Systems Administrator, and you have been tasked with implementing RADIUS to support authentication, authorization, and accounting in your organizations Windows network environment.

  Recognize components of system cpu

Recognize the following components of your system: type of central processing unit (CPU), amounts of random access memory (RAM) and read-only memory (ROM), input and output devices, and types of storage.

  Define a subroutine that takes an integer array

Define a subroutine that takes an integer array

  Evaluate following integrals using simpson rule

Evaluate following integrals using simpson's rule and corrected simpson's rule (or richardson extrapolation in case the corrected simpson's is not applicable). In each case, use n = 2,4,8,16,32.

  Convert following left recursion grammar intoright recursion

Convert the following left recursion grammar into right recursion: a)S->S0S|1 b)S->Aa|Bb ,A->Aa|bA|a, B->Bb|a

  Write down some of the merits of using a distributed

what are some of the advantages of using a distributed network management system in the corporate enterprise? what are

  Provide injective function from to and explain why injective

Provide an injective function from ? to ? and explain why it's injective

  Outside gridlines not affected table''s border true false

The outside gridlines are not affected by a table's border attribute; only the internal gridlines are changed. True False

  Make a class for a singly linked circular list

Make a class for a singly linked circular list that has no end and no beggining. The only access on the list is a single reference, current, that can point to any link on the list.

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