Implementation of function, JAVA Programming

Assignment Help:

Suppose that:

A is the set of characters in the string "pellet";

B is the set of characters in the string "teller";

C is the set of characters in the string "pertinent";
and D is the set of integers enumerated below.

D = {11, 22, 33, 44}

(a) Write down an enumeration of each of the following three sets.

A ∪ B

A ∩ B

C - A

Give the cardinality of A ∪ B.

(b) Write down the value of each of the following propositions. Give a brief expla- nation of your answer in each case.

(i) (44, 't' ) ∈ D x A

(ii) B ⊆ A

(i ii ) C -(A ∪

B) = = (C -A )

∩ (C - B) [4 marks)

(c) Enumerate the set E, defined below by comprehension.

E = {n in Int: (4 < n) ∧

(n < 19) ∧

(MOD(n,3) = = 1)} [3 marks]

(d) A function MULTFIVE is specified below.

function MULTFIVE(n in Int) return in Set of Int pre true.
post The returned value is the f o l l o wing set:
{ i in Int : i ≤ n and there is an integer j > 1 such that i == 5 x j }.


For example, MULTFIVE(23) is the set {10,15,20}.
Give code to implement MULTFIVE.


Enter your implementation of MULTFIVE in the Function Window in the WorkPad, and use the WorkPad to test it when the i n p u t , n is 44. Save the WorkPad file which you use in your testing. Include the contents of this file as part, of your Solution Document.

 


Related Discussions:- Implementation of function

Javascript, You can declare a variable by the var statement such as: var...

You can declare a variable by the var statement such as: var strname = some value You can also declare a variable with simply assigning a value to the variable. Although, if

What is struts framework, Struts framework is an open-source framework for ...

Struts framework is an open-source framework for producing the web applications in Java EE, based on MVC-2 architecture. It uses and extends the Java Servlet API. Struts are robust

I need ios native app developer, I want someone to help me prepare a simple...

I want someone to help me prepare a simple inventory system. I am not a programmer trying to learn as i go. Skills required: Android, Java, iPhone, Mobile Phone, Objective

Introduction, the multiple of two number in java

the multiple of two number in java

Program to change base system, Write a program called BaseConverter that pr...

Write a program called BaseConverter that prompts (asks) the user for a base 10 number and another number, between 2 and 10 inclusive. This second number is the base to which to co

How polylines draws in java language, How Polylines draws in java language?...

How Polylines draws in java language? Java automatically closes the polygons it draws. That is it draws polygons which look like the one on the right rather than the one on the

1. Create a text file (you can name it sales.txt) that conta, 1. Create a t...

1. Create a text file (you can name it sales.txt) that contains in each line the daily sales of a company for a whole month. Then write a Java application that: a. asks the user fo

Difference between preemptive scheduling and time slicing, What is the diff...

What is the difference between preemptive scheduling and time slicing? Under preemptive scheduling, the highest priority task executes unless it enters the waiting or dead stat

Need the following code for double variables instead of int, Need the follo...

Need the following code in double var instead of integer. import javax.swing.*; public class arrayVar { public static void main (String[] args) //This is our main method prompt

Develop billing software, Develop Billing Software Project Description: ...

Develop Billing Software Project Description: Need software to print bills on A4 paper in the format provided. The details are shown below - 1. Serially generated Invoice

Write Your Message!

Captcha
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