Skip to main content

Write a complete java program

SMB4103-Introduction to Programming Page 1 of 5
SMB4103-Introduction to Programming
Semester 2, 2018
Log/Workbook Assessment
Log/Workbook No. : Log/Workbook-3
Due date: Week 7

Group/individual:
Weighting:
Individual Assignment
30%

Student ID: ____________________, Student Name: ________________________________
Question one (10 marks)
Write a complete java program that count a total number of duplicate elements in an array. The
program should allow the user to enter 10 numbers and store them in an array. You have to use the
loops statements to enter and search for the repeated numbers. For example, array (A) includes
elements {0, 3, 6 ,7, 2, 0, 3, 2, 13, -2}. The program has to count the number of repeated elements
and display 3.
Answer:

SMB4103-Introduction to Programming Page 2 of 5
Question two (10 marks)
Write a complete java program to find the maximum and minimum elements in an array. For
example, assume A={1, -3, 9, 10, -1, 0, 11, 14, 0, 12}. The program must use a loop to find and display
the minimum number (-3) and the maximum (14).
Answer:

SMB4103-Introduction to Programming Page 3 of 5
SMB4103-Introduction to Programming Page 4 of 5
Question three (10 marks)
Write a complete program in Java to separate odd and even integers in separate arrays. For
example: assume A= {2, 4 ,6, 8, 3}, and B={1, 6, 7, 9,10}. Your program must create two arrays, E
includes even numbers and O includes the odd numbers as follows:
E={2,4,6,8,10}
O={3,1,7,9}
Answer:

SMB4103-Introduction to Programming Page 5 of 5

The post Write a complete java program appeared first on My Assignment Tutor.



Logo GET THIS PAPER COMPLETED FOR YOU FROM THE WRITING EXPERTS  CLICK HERE TO ORDER 100% ORIGINAL PAPERS AT PrimeWritersBay.com

Comments

Popular posts from this blog

Should pit bull terriers be banned in my community

 Discussion Forum: Counterarguments (Should pit bull terriers be banned in my community) You created a question about the topic for your W6 Rough Draft. For this discussion, you will give an answer to that question in the form of a thesis statement. "Dieting Makes People Fat" Main Post: Share your thesis statement with your classmates. Please note: As with last week’s discussion, nothing here is set in stone. Be open to changing everything about your topic, including your position and audience, as you research it and get feedback from your classmates. Topic + Position/Purpose + Supporting Points =Thesis Statement Example: Suppose the question you posed in the Week 5 discussion was something like, “Should pit bull terriers be banned in my community?” After doing some preliminary research, you have concluded that pit bulls, if raised properly, are no more dangerous than other breeds of dogs. Your thesis statement can be something like, “Pitbulls should not be banned

Controversy Associated With Dissociative Disorders

 Assignment: Controversy Associated With Dissociative Disorders The  DSM-5-TR  is a diagnostic tool. It has evolved over the decades, as have the classifications and criteria within its pages. It is used not just for diagnosis, however, but also for billing, access to services, and legal cases. Not all practitioners are in agreement with the content and structure of the  DSM-5-TR , and dissociative disorders are one such area. These disorders can be difficult to distinguish and diagnose. There is also controversy in the field over the legitimacy of certain dissociative disorders, such as dissociative identity disorder, which was formerly called multiple personality disorder. In this Assignment, you will examine the controversy surrounding dissociative disorders. You will also explore clinical, ethical, and legal considerations pertinent to working with patients with these disorders. Photo Credit: Getty Images/Wavebreak Media To Prepare · Review this week’s Learning

CYBER SECURITY and how it can impact today's healthcare system and the future

 Start by reading and following these instructions: Create your Assignment submission and be sure to cite your sources, use APA style as required, and check your spelling. Assignment: Recommendations Document Due Week 6 (100 pts) Main Assignment Recommendations Document The 1250 to 1500-word deliverable for this week is an initial draft of your recommendations. Note that this is a working document and may be modified based on insights gained in module eight and your professor's feedback. This document should contain the following elements: Summary of your problem or opportunity definition A list of possible recommendation alternatives. In this section, you are not yet at the point of suggesting the best set of recommendations but you are trying to be creative and explore all the different ways that the problem or opportunity might best be addressed. The end result here will be a list of alternatives among which you will choose your final recom