حلول واجبات الجامعة العربية المفتوحة (لعــspring2017ـــام)

حلول واجبات الجامعة العربية المفتوحة لجميع تخصصات الجامعة ولجميع فروع الجامعة حلول واجبات – مشاريع تخرج – ملخصات هامة Mobile: 00966542495275 حلول واجبات الجامعة ا
 
الرئيسيةاليوميةس .و .جبحـثالأعضاءالمجموعاتالتسجيلدخول

شاطر | 
 

 M257 Page 1 2014/2015 Spring Faculty of Computer Studies Course Code: M257 Course Title: Putting Java to Work Tutor Marked Assignment – Spring 14-15 Cut-off Date: 27- 28/4/2015 Total Marks:100 converted to be out of 20 Contents: Page Number TMA Instructio

اذهب الى الأسفل 
كاتب الموضوعرسالة
whatsapp::00966542495275
Admin


عدد المساهمات : 1456
تاريخ التسجيل : 07/10/2014

مُساهمةموضوع: M257 Page 1 2014/2015 Spring Faculty of Computer Studies Course Code: M257 Course Title: Putting Java to Work Tutor Marked Assignment – Spring 14-15 Cut-off Date: 27- 28/4/2015 Total Marks:100 converted to be out of 20 Contents: Page Number TMA Instructio   الإثنين مارس 30, 2015 7:52 pm

M257 Page 1 2014/2015 Spring
Faculty of Computer Studies
Course Code: M257
Course Title: Putting Java to Work
Tutor Marked Assignment – Spring 14-15
Cut-off Date: 27- 28/4/2015 Total Marks:100 converted to
be out of 20
Contents: Page Number
TMA Instructions 2
Part 1 3
Part 2 4
Part 3 5
Part 4 5
Part 5 6
Part 6 7
Plagiarism Warning:
As per AOU rules and regulations, all students are required to submit their
own TMA work and avoid plagiarism. The AOU has implemented
sophisticated techniques for plagiarism detection. You must provide all
references in case you use and quote another person's work in your TMA.
You will be penalized for any act of plagiarism as per the AOU's rules and
regulations.
Declaration of No Plagiarism by Student (to be signed and submitted
by student with TMA work):
I hereby declare that this submitted TMA work is a result of my own efforts
and I have not plagiarized any other person's work. I have provided all
references of information that I have used and quoted in my TMA work.
Name of Student:
Signature:
Date:
M257 Page 2 2014/2015 Spring
TMA Instructions
This TMA assesses your work on Units 1-7 of M257. The marks allocated to
each part of a question are indicated in the margin. The total marks for each
question are shown at the beginning of each question.
For TMA questions that require coding, a number of marks may be awarded for
the style of your Java code. This means that we expect you to be consistent
and to follow good practice in the naming of identifiers and layout.
In this TMA, you should do the following:
1- You should develop the required programs in NetBeans IDE.
2- You must create ONE project for all TMA Parts in one package. Note
that the default location for
NetBeans project under Windows 7 is: Documents/NetBeansProjects.
3- You are required to create a Word file named M257_TMA_Spring14-
15_ID_Name. Then you are required to do the following:
• Copy and paste the codes of each part and the answers of the
theoretical questions.
• Add two snap-shots for the output for each part.
The TMA for the course has been uploaded to the LMS. You should start
working on it right away. Please note the following when working on the TMA:
• No group work is allowed for the TMA. Each student must submit
his/her own solution individually.
• Copying the answers from any source other than your own work will
be considered as plagiarism.
• Use your own words to answer essay questions.
• Read carefully the second page of the TMA for important instructions.
After you finish solving the TMA, You have 2 submission links:
1- The Regular Submission Link: you need to submit to the regular
submission link a compressed file (e.g. zip file) which includes the
following: your NetBeans project folder (in Windows 7, you can find this
under Documents/NetBeansProjects),
2- The Turnitin submission Link: You need to submit a document Word
file including your answers to all questions according to the guidelines on
the cover page of the TMA.
Your TMA will not be marked if all the required files are not submitted on the 2
submissions’ links.
M257 Page 3 2014/2015 Spring
Part 1 [15 marks]
This assignment is an exercise in fundamental Java concepts such as: general classes, different
types of methods, and basic control structure. This question includes sub- parts, each of which is
simple if done according to the specifications given in the exercise.
You are required to review M257 – Unit 1, 2 & 3 to be able to solve Part 1.
Write a Java class according to the following specifications:
1) The class has a class variable that holds the string representation of the Binary
number which includes (0s & 1s). [0.5 mark]
2) The class has a class variable as an instance variable of Scanner class that allows
the user to get the input from the keyboard. [0.5 mark]
3) Write a static method displayMenu() which has no argument and does not return any
result. It displays the following lines on the screen. [1 mark]
=====================
1- Get the Binary number
2- Convert Binary to Decimal
3- Convert Binary to Octal
4- Exit
Enter your choice
4) The class has a static method getBinary() which has NO argument. It asks the user
to enter a value of string binary number and then returns it. [1 mark]
5) The class has a static method convertBtD(String). It has one argument which is a
value of a string binary number. The method converts the binary number to decimal
number and returns the corresponding value of the decimal number. [3 marks]
6) The class has a static method convertBtO (String). It has one argument which is a
value of a string binary number. The method converts the binary number to octal
number and returns the corresponding value of the octal number. [3 marks]
7) The program should start by asking the user to enter the value of a string binary
number and then display the menu.
The program should keep asking the user to enter his choice to convert the value of a
string binary number to its corresponding value in either decimal or octal number
system by invoking the static methods above.
The program should keep asking the user to enter his/her choice and it should stop
once the user enters 4 to exit. [3 marks]
Cool You are required to search on the e-library to find the algorithms that you have to use
to convert the Binary number to decimal number and octal number. It is not allowed to
use any casting or specification mechanism to convert the numbers.
[3 marks] will be awarded for providing 3 screen shots.
M257 Page 4 2014/2015 Spring
Part 2 [25 marks]
This assignment is an exercise in fundamental Java concepts such as: classes, constructors, methods,
building GUI interfaces, writing event driven programs, along with using flow control structures, This
question includes one part, which is simple if done according to the specifications given in the exercise.
You are required to review M257 – Units 6&7 to be able to solve Part 2.
Develop a public class ConverterGUI to the following specifications:
You are required to build a GUI interface ConverterGUI. It allows the user to input the
value of a string binary number by clicking on 0 and 1 buttons and then converts it to its
corresponding value either decimal or octal number by clicking on convert to decimal and
convert to octal buttons respectively.
The GUI interface should appear as in Figure 1 below, according to the following
specifications: [8 marks]
• Set its size to 400x200.
• Set its title to Converter.
• The frame use setDefaultCloseOperation() method to close the widow and
terminates the program when the user clicks on close button.
• The frame has Grid Layout. It consists of two JPanels, and 3 JButtons as:
• Panel1: includes the binary JLabel, the binary JTextField (Non Editable), and the
result JLabel.
• Panel2 includes 2 JButtons, to enter 0 & 1. [4 marks]
• Convert Binary to Decimal Button: it converts the value of a string binary number in
the text-field to decimal number and then displays the decimal value in the result
label as in Figure 2 below. You are required to invoke the static method convertBtD
(String). [2 marks]
• Convert Binary to Octal Button: it converts the value of a string binary number in the
text-field to octal number and then displays the octal value in the result label as in
Figure 3 below. You are required to invoke the static method convertBtO(String).
[2 marks]
• Clear button: it clears the value in the JTextField. [2 marks]
• You are required to use any Mouse Event to react to the buttons’ click above.
[2 marks]
Figure 1
Figure 2 Figure 3
[5 marks] will be awarded for providing 3 screen shots.
M257 Page 5 2014/2015 Spring
Part 3 [10 marks]
You are required to review M257 – Units 6 & 7 to be able to solve Part3.
The Questions depend on Part 2
1- In Units 6 & 7 you covered GUI and Event-driven programming, what are the benefits of using
GUI tools as inputs instead of making the user to fill the data? You are required to write about the
usability of using GUI (300 words maximum). [5 marks]
2- In Unit 7 you covered Mouse Event in Event-driven programming, [5 marks]
2.1- What are the 2 mechanism that you covered in this subject?
2.2- What are the advantages of using both of them?
2.3- Which one did you use to solve Part 2? And why?
Part 4 [22 marks]
This assignment is an exercise in fundamental Java concepts such as: classes, constructors, methods, basic
control structure, and Arrays. This question includes four sub- parts, each of which is simple if done
according to the specifications given in the exercise.
You are required to review M257 – Units 1, 2 & 3 to be able to solve Part 4.
Develop a public Interface Calculation to the following specifications: [2 marks]
- It has a method Number addition (Number, Number). It has 2 arguments as instance objects of
Number. It calculates the summation and then returns the summation of the 2 arguments.
- It has a method Number subtraction (Number, Number). It has 2 arguments as instance
objects of Number. It calculates the subtraction and then returns the subtraction of the 2
arguments.
Develop a public class Number that represents fraction numbers, for example


 ,


,


, to the
following specifications: [20 marks]
1) The class implements Calculation interface.
2) The class has two private integer instance variables: numerator & denominator.
3) The class has a two-argument constructor to set its instance variables to given values.
4) The class has a zero-argument constructor to initialize the numerator by zero and initialize
the denominator by one. It should invoke its two-argument constructor.
5) The class has a one-argument constructor to initialize the numerator by the given value as
argument and initialize the denominator by one.
6) The class has the getter and setter methods of it instance variables numerator &
denominator.
7) The class has a setNumber(Number) method that sets the given value to its instance
variables numerator & denominator.
Cool The class has to override Object’s toString() method in order to return a string
representation of a Number instance object similar to format given below:
numerator + "/"+ denominator as 5/3
9) The class has to override Object’s equals() method in order to return true if the object as
argument equal to the object who invoked the method and false otherwise. The method
should compare all the 2 instance variables of the two objects.
10) The class has to implement all necessary methods according to its specifications.
M257 Page 6 2014/2015 Spring
Part 5 [14 marks]
This assignment is an exercise in fundamental Java concepts such as: classes, constructors, methods, basic
control structure, and Arrays. This question includes four sub- parts, each of which is simple if done
according to the specifications given in the exercise.
You are required to review M257 – Units 1, 2, 3 & 5 to be able to solve Part 5.
Develop a public class Matrix according to the following specifications [14 marks]
The Matrix class represents matrix of the fraction Number to the following specifications and for
example the size of the matrix as 2 rows x 3 columns












1) The class has a private instance variable HashMap >, which
represents the collection of numbers from class Number. where
Integer represents the number of rows- 2 as in the example above.
ArrayList contains the values of the fraction Numbers of Number class (the
elements in each row). [1 mark]
2) The class has 2 static public instance variables rows and cols. where rows represents the
number of rows in the matrix. Cols represents the number of elements in the ArrayList of each
row. [1 mark]
3) The class has a two-argument constructor that creates and initializes HashMap ArrayList> instance object and set the values of rows and cols by the given values
as arguments. [2 marks]
4) The class has a public method void fillMatrix ( ). The method uses the Scanner class to fill the
objects of Number in the matrix according to the number of items in each row. [2 marks]
5) The class has a public method printMatrix(). It displays the items of the matrix as rows and
columns as highlighted above [2 marks]
6) The class has a public method Number getItem(int rowNO, int colNO) which gets and
returns the specific number item in the matrix according to the given argument.
EX. getItem(2, 3) returns 


[2 marks]
7) The class has a public void addMatrices (Matrix, Matrix) which has 2 matrices as arguments
and it calculates the summation of these matrices. [2 marks]
Cool The class has a public void subMatrices (Matrix, Matrix) which has 2 matrices as arguments
and it calculates the subtraction of these matrices. [2 marks]
M257 Page 7 2014/2015 Spring
Part 6 [14 marks]
This assignment is an exercise in fundamental Java concepts such as: classes, constructors, methods, basic
control structure, and Arrays. This question includes four sub- parts, each of which is simple if done
according to the specifications given in the exercise.
You are required to review M257 – Units 1, 2, 3 & 5 to be able to solve Part 6.
Develop a public class TestMatrix which includes the static main method according to the
following specifications: [10 marks]
1) The class should ask the user to enter the number of rows and columns in the matrix.
[2 marks]
2) The class has to declare and create the first matrix, and then the fill the matrix with items as
fraction numbers. [1 mark]
3) The class has to declare and create the second matrix, and then the fill the matrix with items
as fraction numbers [1 mark]
4) The class has to declare and create the third matrix, which holds the summation of the first and
the second matrix. [1 mark]
5) The class has to declare and create the fourth matrix, which holds the subtraction of the first
and the second matrix. [1 mark]
6) Finally, the class has to print the first, second, third, and fourth matrix, respectively. [4 marks]
4 marks will be awarded for providing 4 screen shots.
“End of Assessment”

_________________
لتحميل ملف حل الواجب الحل النموذجي للواجب.doc يجب عليك  التسجيـــل بالمنتدى لتتمكن من تحميل الملف


حل واجب - خدمات مجانية – حلول واجبات الجامعة الجامعة العربية المفتوحة- كل الجامعات - حل واجب - حل واجب TMA- حل واجب TMA01
لجميع تخصصات الجامعة ولجميع فروع الجامعة
حلول واجبات – مشاريع تخرج – ملخصات هامة
Mobile: 00966542495275  or
WhatsApp:00966542495275

smsm.hamdy66@yahoo.com
حلول مضمونة وغير مكررة وغير متشابهة لجميع واجبات الجامعة
متوفرمدرسين ومدرسات لجميع المواد والتخصصات
السعودية-الكويت-لبنان-مصر-البحرين-الأردن-عمان-الرياض-الدمام-جدة-حائل-الاحساء-المدينة المنورة
KSA-Kuwait-Bahrain-Oman-Jordon-Lebanon-Egypt
قسم خاص لواجبات التربية لجميع التخصصات ولجميع المستويات
http://tmas.123.st
الرجوع الى أعلى الصفحة اذهب الى الأسفل
معاينة صفحة البيانات الشخصي للعضو http://learn.123.st
 
M257 Page 1 2014/2015 Spring Faculty of Computer Studies Course Code: M257 Course Title: Putting Java to Work Tutor Marked Assignment – Spring 14-15 Cut-off Date: 27- 28/4/2015 Total Marks:100 converted to be out of 20 Contents: Page Number TMA Instructio
الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1
 مواضيع مماثلة
-
» Avira Premium Security Suite 9.0.0.387 + key 2014
» نكت 2015 لحق حالك
» شرح : كيفيه تغير الصفحه الرئيسيه للمتصفح home page
» Page de garde
» 2015 عام انقراض القنوات الارضية

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
حلول واجبات الجامعة العربية المفتوحة (لعــspring2017ـــام) :: الحلول النموذجية لعام 2015-
انتقل الى: