Free Essay

# Nothing

Submitted By
Words 487
Pages 2
1. Determine the output displayed when the button is clicked.

Private Sub btnDisplay_Click(...) Handles btnDisplay.Click ‘Triple a number Dim num As Double = 5 lstOutput.Items.Add(Triple(num)) lstOutput.Items.Add (num)
End Sub
Function Triple(ByVal x As Double) As Double Dim num As Double = 3 Return num * x
End Function

2. Determine the output displayed when the button is clicked.

Private Sub btnDisplay_Click(...) Handles btnDisplay.Click Dim states, senators As Double States = 50 Senators = 2 Senate(states * senators)
End Sub
Sub Senate (ByVal num as Double) txtBox.Text = “the number of U.S. Senators is “ & num
End Sub

3. Find the errors.

Private Sub btnDisplay_Click(...) Handles btnDisplay.Click Dim word As String, number As Double word = “seven” number = 7 Display (word, number)
End Sub
Sub Display(ByVal num As Double, ByVal term As String) textOutput.Text = num & “ “ & term
End Sub

4. Rewrite the program so input, processing, and output are each performed by calls to Sub procedures.

Private Sub btnCompute_Click(...) Handles btnCompute.Click ‘Information about trees Dim num As Integer = 7 Tree = “redwood” ht = 362 lstBox.Items.Add(“The tallest “ & tree & “ tree in the U. S, is “ & ht & & “ feet.”) tree = “pine” ht = 223 lstBox.Items.Add(“The tallest “ & tree & “ tree in the U. S. is “ & ht & “ feet.”)
End Sub

5. Determine the output displayed when the button is clicked.

Private Sub btnDetermine_Click(...) Handles btnDetermine.Click Dim word As String = “” Dim num As Integer GetFacts(word, num) txtOutput.text = “The first “ & num & “ letters of “ & word & “ are “ & BegOfWord(word, num) & “.”
End Sub
Sub GetFacts(ByRef w As String, ByRef num As Integer) w = InputBox(“enter a word: “) n = CInt(InputBox(“Enter a number less than the length of the word: “))
End Sub
Function BefOfWiord(ByVal word As String, ByVal num As Integer) As String Return word.Substring(0, num)
End Function
(Assume the two responses are Education and 3.)

6. Determine the output displayed when the button is clicked.

Private Sub btnDisplay_Click(...) Handles btnDisplay.Click Dim price, markdown, salesTax, finalCost as Double InputData(price, finalCost) finalCost = CostOfItem(price, markdown, salesTax) DisplayOutput(price, finalCost)
End Sub
Sub InputData (ByRef price As Double, ByRef markdown As Double, ByRef salesTax As Double) Price = CDbl(InputBox(“Price of item: “) Markdown = CDbl (InputBox(“Percentage discount: “)) salesTax = CDbl(InputBox(“Percentage state sales tax: “))
End Sub
Function CostOfItem(ByVal pr As Double, ByVal md As Double, ByVal st As Double) As Double Dim reducedPrice, cost As Double reducedPrice = pr – ((md/100) * pr) cost = reducedPrice + ((st / 100) * reducedPrice) Return cost
End Function
(Assume the three responses are 125, 20, and 6)

7. Identify the errors.

Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim word As String word = InputBox("What is your favorite word?") txtOutput.Text = "When the word is written twice, " & _
Twice(word) & " letters are used."
End Sub
Function Twice(ByVal w As String) As Integer
'Compute twice the length of a string
Dim len As Integer
Return len = 2 * w.Length End Function

### Similar Documents

Free Essay

#### Nothing

Words: 272 - Pages: 2

Free Essay

#### Nothing

...------------------------------------------------- Philosophy Western philosophy Some would consider the study of "nothing" to be foolish, a typical response of this type is voiced by Giacomo Casanova (1725–1798) in conversation with his landlord, one Dr. Gozzi, who also happens to be a priest, “ | As everything, for him, was an article of faith, nothing, to his mind, was difficult to understand: the Great Flood had covered the entire world; before, men had the misfortune of living a thousand years; God conversed with them; Noah had taken one hundred years to build the ark; while the earth, suspended in air, stood firmly at the center of the universe that God had created out of nothingness. When I said to him, and proved to him, that the existence of nothingness was absurd, he cut me short, calling me silly.[3] | ” | However, "nothingness" has been treated as a serious subject worthy of research for a very long time. In philosophy, to avoid linguistic traps over the meaning of "nothing", a phrase such as not-being is oftenemployed to unambiguously make clear what is being discussed. Parmenides One of the earliest western philosophers to consider nothing as a concept was Parmenides (5th century BC) who was a Greek philosopher of the monist school. He argued that "nothing" cannot exist by the following line of reasoning: To speak of a thing, one has to speak of a thing that exists. Since we can speak of a thing in the past, it must still exist (in some sense) now and......

Words: 2165 - Pages: 9

Free Essay

#### King Lear Nothing

...Hermesmann 1 Anna Hermesmann Nothing From Nothing: Concepts of Justice in King Lear Ex nihilio nihilfit—“nothing comes from nothing.” In the pre-Christian world of Shakespeare‟s King Lear, this doctrine rules as the actions of the characters prove futile and tragedy results. Lear fails to maintain order in his kingdom and his family; Gloucester loses his sight; and Cordelia, the only one who really loves her father, dies. Critics such as Samuel Johnson have argued that because of Cordelia‟s death, Shakespeare‟s ending is flawed, that he fails to follow the “natural ideas of justice” by allowing “Cordelia to perish in a just cause.” In 1689, approximately eighty years after Shakespeare completed the first text of King Lear, Nahum Tate published an alternate ending to the play in which Cordelia lives and eventually goes on to rule in her father‟s place. While this “happy” ending was performed as if it were Shakespeare‟s original for decades afterwards, it actually runs contrary to the original version of King Lear by applying Judeo-Christian human concepts of justice to a world that is not governed by a just God. In the nihilistic world Shakespeare creates, there is no just force to establish an objective morality, and therefore, the rules of right and wrong, and the consequences of each, are obsolete. Thus, because King Lear is set in a world in which the generally accepted rules of justice do not apply, Shakespeare‟s ending, including the death of the only truly virtuous......

Words: 3397 - Pages: 14

Free Essay

#### Loweel System, Know Nothings, Samuel Morse

...cuts and fills which were required to enable the canal to pass through hills and over valleys, stone aqueducts were necessary to carry it across streams and eighty-eight locks of heavy masonry with great wooden gates were needed to permit ascents and descents. It became an immediate financial success. 5) Factory System—most of the manufacturing occurred in households with people making things by hand or simple machines, technology improved. Entrepreneurs begin to make use of new and larger machines driven by water power that allowed them to bring textile operations together under one roof. The factory system spread rapidly in the 1820’s. 6) Know-Nothings-a strict code of secrecy, which included the secret password, used in lodges across the country, “I know nothing”. Members of this movement became know as the Know Nothings. They turned their attention to party politics and...

Words: 663 - Pages: 3

#### Persuasive Essay On Buy Nothing Day

...“Buy Nothing Day” was first organized in Canada to increase awareness of excessive consumerism. It’s a day where people are urged to not purchase any goods for a full 24 hours. However, if this day were to be implemented into the days of American people its intended purpose would not be fulfilled. It would merely raise protests and debate among people and would change nothing in the actions of citizens. Ever since I was born in the United States I was given everything a child should have. My parents cared for me and supplied me with what I needed and growing up I’ve learned about the Constitution and the Bill of Rights and how they both protect the rights of the American people. America is known for providing freedom to people by allowing...

Words: 753 - Pages: 4

#### Buy Nothing Day Research Paper

...across the street. But then it hits you, that you can not go out and purchase this delicious bagel due to “Buy Nothing Day”, how annoying would that be? Canada has instituted the Buy Nothing Day to reduce consumerism because they believe it has become a problem. On this day, the public is restrained from purchasing any goods from any store, expecting to stop over consumption. However this idea is absolutely absurd. The way in which people choose to use their earnings, has nothing to do with the government. Having a Buy Nothing Day not only affects businesses, but the society in general. Implementing a Buy Nothing Day, would affect thousands of business, homeless...

Words: 913 - Pages: 4

Free Essay

Words: 416 - Pages: 2

Free Essay

#### Expressive Writing

...Boom Boom Boom!! Sounded the fastness of my heavy heart as I gingerly took the letter from my dad and uttered not a word as I backtracked without a backwards glance to my haven. A mixture of apprehension, fear and anger crashed over me like a tidal wave crashing against my skull, how dare she contact me yet again and put me through all this pain. Slowly, Slowly I open the letter and gingerly remove it from its personal surroundings. This wasn’t the first letter and certainly wasn’t to be the last letter from my mum who was once more asking for reconciliation, forgiveness on my part and offering explanations on hers. A feeling of emptiness laid heavy as I knew that however many letters, texts I received from my mum there was absolutely nothing I could do about contacting her in any possible way because of the...

Words: 638 - Pages: 3

...MUCH ADO ABOUT NOTHING Title As a title, Much Ado About Nothing fits neatly with those of Shakespeare’s other plays written around the same time: the titles seem whimsical and even flippant. Twelfth Night was alternatively titled What You Will, and As You Like It seems a much less informative title than, say, The Tragedy of Hamlet, Prince of Denmark. Still, the capricious titles are actually as reflective of their content as any history or tragedy title. The plot of Much Ado About Nothing centers on a lot of hubbub over little misunderstandings; there’s a whole lot of fuss about stuff that ultimately isn’t that important. For the bigger issues in the play, though, we turn to the fact that, in Shakespeare’s day, "nothing" was often pronounced the same way as "noting." The play is built around the process of "noting," which has myriad meanings. It can mean "to take notice of" something, to eavesdrop, to observe, or to write something down – but these notings aren’t necessarily accurate. A person can misunderstand a meaning, or mishear, or misreport something, in the process of noting too. The foibles that result from noting (and misnoting) are central to keeping the play spinning. If that wasn’t interesting enough for you, you might want to note that "nothing" was also an Elizabethan slang term for the vagina. "Much Ado About Vagina" makes sense as a title, right? After all, the highs and lows of the play revolve around men and their relationships with, suspicion of,......

Words: 3038 - Pages: 13

Words: 379 - Pages: 2

Free Essay

... “Trickery or Deceit” Much Ado about Nothing, is one of Shakespeare’s, romantic comedies. I chose, Trickery or Deceit, as my title, because, sometimes in true life it’s difficult to determine the two. In this play deceit plays a major role. It first starts one week before the wedding. Hero and her friends decided that Beatrice and Benedick argue too much and did indeed share feelings for each other, And so they plotted a trick to make them fall in love, they included everyone in it, Don Pedro, Hero, Claudio pretended to say things about Beatrice loving Benedick so, that Benedict could hear. And then also pretended to speak alone in the garden, knowing of Beatrice’s presence they continued to say things of Benedick’s Love for Beatrice, which wooed the both of them and they both fell in love, but, had no idea they were being Deceived. But every ones happiness is to soon come to an end, as Don Jon plots to ruin their wedding.. He has Borachio pretend to court and make gestures at Hero, while Claudio and Don Pedro watched, when indeed it was Margaret whom he courted and had sex with. During my research of “Much Ado about Nothing”, I found that this is a perfect example of” Trickery or Deceit”, or both? My studies show that the author has an open mind and left the decision to be made by the audience. In the play Much Ado about Nothing, the word Nothing in the play’s title, pronounced in the Elizabeth English. Suggests a......

Words: 1107 - Pages: 5

#### How Does Grendel Build Monstrosity In Beowulf

...nothingness and void is what makes him monstrous. It quite literally sucks the soul out of everything. It is a vacuum, merely taking and remaining empty. Furthermore, this stifling darkness, of which no light can penetrate, envelops the entirety of Grendel. The Dragon’s immolating teachings seared through Grendel’s soul and left nothing but darkness. The Dragon shaped Grendel to be this way. In this way, his entire influence upon Grendel turned him into a void monstrosity. Grendel, through his interactions with the Dragon, crystallizes into a monstrous entity of...

Words: 1087 - Pages: 5

Free Essay

#### Import Java

...import java.awt.*; import java.awt.event.*; import javax.swing.*; class Calculator extends JFrame implements ActionListener { private static final long serialVersionUID = 1L; TextField txt=new TextField(15); JButton btn1 = new JButton("1"); JButton btn2 = new JButton("2"); JButton btn3 = new JButton("3"); JButton btn4 = new JButton("4"); JButton btn_arti = new JButton("+"); JButton btn5 = new JButton("5"); JButton btn6 = new JButton("6"); JButton btn7 = new JButton("7"); JButton btn8 = new JButton("8"); JButton btn_eksi = new JButton("-"); JButton btn9 = new JButton("9"); JButton btn0 = new JButton("0"); JButton btn_clr = new JButton("CLR"); JButton btn_carpi = new JButton("*"); JButton btn_bolu = new JButton("/"); JButton btn_esit = new JButton("="); String str_number = ""; int operation = 0; double int_number1 = 0; double int_number2 = 0; double result = 0; public Calculator() { JFrame frame = new JFrame("CALCULATOR"); frame.setSize(320,320); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setResizable(false); frame.setVisible(true); frame.setLayout(new BorderLayout()); JPanel HeadPanel = new JPanel(); JPanel NumberPanel = new JPanel(); JPanel LabelPanel = new JPanel(); LabelPanel.setBackground(Color.WHITE); HeadPanel.setBackground(Color.BLACK); NumberPanel.setLayout(new GridLayout(3,3)); LabelPanel.setLayout(new......

Words: 793 - Pages: 4

Free Essay

...Beatrice is a strong-willed, independent woman. How far do you agree with this statement? I would agree for the most part with this statement. Beatrice is indeed strong-willed, but her independence has its limitations. As with many Shakespearean characters, appearance can be deceptive, and what we see is only a facade, a mask to hide their true character or feelings. I believe that Beatrice uses her cleverness and quick wit to hide her real feelings, and that although she is independent to a certain extent, she is aware that she has limitations because of her gender. Although Beatrice states ‘I would rather hear my dog bark at a crow than hear a man swear he loves me’ she is ultimately fooled into believing that Benedick loves her. The fact that she is tricked so easily, and subsequently admits her reciprocal love, tells us that she views marriage in a more favourable light than she had previously led us to believe. Whether she gave in to the ‘social construct’ demanded by the patriarchal society in which she lived is questionable. What we do know is that Shakespeare has presented her as a wilful, self-confident, autonomous woman who appears to revel in her single status. In contrast we have Hero, the antithesis of Beatrice. She is meek, obedient and completely dominated by the men in her life. She is the perfect foil for Beatrice, her willingness to please further enhancing Beatrice’s character. It is clear from the start of the play that Beatrice is not an...

Words: 1365 - Pages: 6