Write code to store fictitious names in that array

Assignment Help JAVA Programming
Reference no: EM131385013

Activity 1: Create a Windows application to perform the following functionalities.

A) Create an array that contains the names of the months of the year.

B) Using For...Each loop, write code G display the names of the months.

C) Create a second array to store the number of days of corresponding months (ignore leap-years) of first array.

D) Request a month from the user and use "For...loop" to display the number of days for that month.

E) Request a month from the user, delete number of days for that specified month and display the deleted value by using "Do...While loop".

Activity2: Create a Windows application to perform the following functionalities.

An office building has two floors (0 to 1), each of which has four offices (0 to 3). Each office occupied by one person.

A) Declare an array to store the names of occupants for each office.

B) Write code to store fictitious names in that array.

C) Write a short routine to display the occupants of each office along with the corresponding floor and office number.

D) Write a function to display the occupants for the requested office. Use "If...Then" statement to check the existence of that office.

Activity 3: Use Linear Search technique and complete the following function to find the position of the number 55 from the following array. Create a Windows application to display the position.

17

23

31

47

55

62

69

74

88

Public Function LinearSearch() As Interger()

Dim target as integer = ................................. the element to search for

Dim s() as integer = ................................. the array to be searched

Dim last as integer = ................................. the last position of the array

Dim pos as integer = ................................. the middle position of the array

If (last < 0)

Return - 1

End if

while ((.................................) And (.................................))

pos+=1

if ((.................................) And (.................................))

return pos we found it

else

return-1 we didn't find it

end if

end while

Activity 4: Use Binary Search technique and complete the following function to find the position of the number 29 from the following array. Create a Windows application to display the position.

9

15

22

29

36

54

55

61

70

73

88

 Public function BinarySearch() As Integer()

Dim target, first, last, mid As Integer   'Declare all variables

Target = ................................. the element to search for

first = ................................. the fast position of the array

last = ................................. the last position of the array

Dim s() As Integer = ................................. the array to be searched

While (first <= last)   

mid = ................................. /2

If (.................................) Then

Return .................................

Exit While

Else

If (.................................) Then

Last = .................................

Else

first = .................................

End If

End If

End While

Return - 1End Function

Activity 5: Use editor provided test tools, create and execute/run test case for each activity. Finally, test result will be attached with the assessment.

Reference no: EM131385013

Questions Cloud

Discuss about the post given below : You recently visited a social service organization to interview a social worker and to learn more about the services the organization provides.For this Assignment, think about your experience gathering information on the social service agency. Con..
What type of customers will served by internet startup : What zoning ordinances, if any, regulate the type of home-based business you want to start?- What type of customers will be served by the Internet startup?
How different would you approach each audience : COM/295- Describe the product or service, including its main characteristics. Why do you believe this product is worthwhile? A profile of your audience/s. Why are these audience/s important? How different would you approach each audience?
What were the three least important criteria you used : What were the three most important criteria you used when deciding where to locate your company? - What were the three least important criteria you used? Why?
Write code to store fictitious names in that array : An office building has two floors (0 to 1), each of which has four offices (0 to 3). Each office occupied by one person. Declare an array to store the names of occupants for each office. Write code to store fictitious names in that array
Identify economic legal and regulatory forces and trends : Identify economic, legal, and regulatory forces and trends. Critique how well the organization adapts to change. Analyze and explain the supply chain of the new division of the existing business.
What should the waughs have done to avoid given situation : How could the Waughs be disappointed with $32 million?- What should the Waughs have done to avoid this situation?
Discuss about the post given below : In order for counselors to effectively assist clients who are of a different cultural or religious background then their own, it is required that they become multiculturally competent. In highlighting the importance of being multiculturally compet..
Do you agree with the bonneaus decision to sell : Do you agree with the Bonneaus' decision to sell? Why or why not?- Why did the buyers retain Ed as a consultant?

Reviews

len1385013

2/7/2017 3:51:32 AM

This test is based on different programming technique and logic such as syntax, language features, data structure (such as array), standard algorithms (such as sequential search, binary search, insertion and deletion to operate on arrays in aspect of VB.net. It s evaluated the candidate's key programming concepts. For the coding, consider the naming, layout & commenting convention and write internal comments as well. Use editor provided debugging tools to trace code execution and examine variable contents to detect and correct errors. Total allocated time is 3 hours.

Write a Review

JAVA Programming Questions & Answers

  Cascading style sheet to a website

Compare and contrast the process of adding JavaScript and a Cascading Style Sheet to a Website. Determine if they can be used simultaneously in a page.

  Can we run java byte code on android since android

Can we run java byte code on android since android is also java based

  Write a java application that calculates and displays

The application should ask the user to enter the name of the property owner and the assessed value of the property for each owner (total N owners) and calculate the property tax.

  Typical industrial engineering problem

A company manufactures two products, A and B. Product A can be sold for $145 per unit and B for $75 per unit. Management requires that at least 1850 units be manufactured each month.

  Modify the scholarship application

Modify the Scholarship application so that if a user enters a grade point average under 0 or over 4.0, or a negative value for either of the activities, an error message appears.

  Algorithm for evaluating postfix expressions

Should you find it convenient, you may also assume that X1 is the first character on the line, and that each Xi is separated from the next by exactly one space

  Write the constructor date which has 3 parameters

The Date.java class. Implement a public class Date that represents a date composed of a month , day, and a year. Declare month, day, and year as integers. Date has a constructor with 3 parameters and 4 methods. Write the constructor Date which has..

  What value is assigned to the variable phrase

Create a class State with five properties to hold the information about a single state and a method that calculates the density (people per square mile) of the state.

  Write portions of java class that models a very simple clock

You will be writing portions of a Java class that models a very simple clock. You will also be provided with two different "front ends" that use this same class as a plug-in - a simple program that loops through the time for a full hour of time.

  Write a simple program that uses the class

Write a simple program that uses the class. It should prompt the user to input a string, display it, call one or the other of the class functions to convert it, then display the converted string.

  The goal is to create a project that would let a user

the goal is to create a project that would let a user compute area and perimeter of a polygon. restrict the type of

  Create a class called employee that includes three variables

(Employee Class) Create a class called Employee that includes three instance variables-a first name (type String), a last name (type String) and a monthly salary (double).

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