المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : حل واجب m257 الجديد 2013/2014 اتصل 0544321455 - 00966544321455



أسواق
02-11-2013, 09:30 PM
حل واجب m257 الجديد 2013/2014 اتصل 0544321455 - 00966544321455 (http://www.aswaqcity.com/thread1315139.html)


M257 TMA Fall 13-14 Page 1
M257: Putting to Work
Fall 2013-2014
Assignment Booklet
: TMA m257 (http://www.aswaqcity.com/thread1315139.html) (Units 1-7) Cut-off date: Monday, December 9, 2013
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
code. This means that we expect you to be consistent and to follow good practice in the naming of
identifiers and layout. When writing your code, add a comment at the top of each code page with
your own as the author ONLY. In-line and end-line comments are strictly prohibited.
In all questions that require coding Part 1 & 2, you should do the following:
1- You should develop the required programs in NetBeans.
2- You must create ONE project for all TMA questions in one package, the default for
NetBeans projects under Windows 7 is: s/NetBeansProjects.
This assignment should be submitted electronically:
• You should open a file
• You must add Your-ID, Your-Full-, Your-Session-Number in the first line of the
file,
• You must copy the source codes for Part 1 & 2 into a file, then
• You must add your answers for Part 3 at the end of the file
• then Save the file
• Finally, copy all the s of the file and paste them into the area on LMS,
that means you won’t upload the file, just copy and paste the s of the file
Please note that there may be marks deduction if you don’t follow ALL of the above instructions.
M257 TMA Fall 13-14 Page 2
Part 1 [40 marks]
This assignment is an exercise in fundamental concepts such as: classes, constructors, methods,
composition, interfaces, 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.
Write the following programs according to their specifications:
(a) Develop a public class Item to the following specifications: (10 marks)
• The class has two private instance variables: String , and int id.
• The class has a one copy instance variable for all instance s itemCounter, it
keeps the current number of items that have been created.
• The class has a two-argument constructor to set its instance variables to given
values.
• The class has a zero-argument constructor to initialize the values of its instance
variable. It should invoke the two-argument constructor.
• The class overrides the ’s toString() method in order to return a string
representation of a item similar to format given below:
= ,ID=
• The class implements any additional necessary methods, if applicable.
(b) Develop a public class SwItem to the following specifications: (8 marks)
• The class is a subclass of Item.
• The class has one private instance variable: String version.
• The class has a three-argument constructor to set its instance variables to given
values. This constructor should invoke the super-class constructor.
• The class has setter and getter methods for version.
• The class overrides the toString() method in order to return a string representation of a
SwItem . It should invoke the parent’s toString()method to get the first part of the
returned value to be similar to format given below:
Sw Item {" = ,ID= ,Version= "}
(c) Develop a public class HwItem to the following specifications: (8 marks)
• The class is a subclass of Item.
• The class has one private instance variable: String type.
• The class has a three-argument constructor to set its instance variables to given
values. This constructor should invoke the super-class constructor.
• The class has setter and getter methods for type.
• The class overrides the toString() method in order to return a string representation of a
SwItem . It should invoke the parent’s toString()method to get the first part of the
returned value to be similar to format given below:
Hw-Item {" = ,ID= ,Type= "}
(d) Develop a public class Equipment to the following specifications: (14 marks)
• The class has one private instance variable an array Item [ ], which will represent the
collection of items from class Item in the class Equipment.
M257 TMA Fall 13-14 Page 3
• The class has a zero-argument constructor that creates and initializes the array of
items and assigns its maximum size with any number you use greater than 100.
• The class has a public method void addGeneralItem(int aid, String a) which is
used to create an instance of Item and add it to the array of items.
• The class has a public method void addSWItem(int aid, String a, String aver)
which is used to create an instance of SwItem and add it to the array of items.
• The class has a public method void addHWItem(int aid, String a, String atype)
which is used to create an instance of HwItem and add it to the array of items.
• The class has a public String showEquipment() which returns either a string
representation of the array of items and all its different types of items or a string
message that “The array is empty”.
• The add-Item methods will be used in the second part of this TMA.
Part 2 [50 marks]
This assignment is an exercise on using and building GUI interfaces, writing event driven programs,
along with using flow control structures, and JOptionPane, Exception classes
Develop a public class MyFrameMain to the following specifications:
• You are required to build a GUI interface to be able to input the values of the instance
variables for the different types of items, add them to the array, copy the Array into a file,
and exit the program.
• The GUI interface should appear as in figure 1 below, it contains: [22 marks] total
1. A declaration and creation of a reference variable of the type Equipment [1 marks]
2. Set its size to 500x500.
3. Set its title to your AOU-ID and your .
4. A JLabel for the ID and a JField to input its value.
5. A JLabel for the a JField to input its value.
6. A JButtonGroup that contains three JRadioButton/s for SW, HW, and General. The
aim of using a JButtonGroup is to tell that a set of buttons are grouped
together and have the property that only one of the buttons can be selected at a
time. Set General as an initial state selected.
7. A JField to input the value SW version.
8. A JField to input the value HW type.
9. A JLabel for the itemCounter value, which updates when new item is added
successfully to the array of items.
10. The JArea which uses to display the items of the array of items, and it is not
editable.
11. The class has 4 JButton/s according to their detailed specifications below. [16
marks] total
12. An appropriate event listener should be used and the buttons should implement the
listener . [4 marks]
13. Appropriate resources should be checked and appropriate decisions should be
implemented
14. The class should have a main method to instantiate the class. [2 marks]
M257 TMA Fall 13-14
(Add an Item into the Array
• When the user clicks on the button, the
collected and an appropriate
according to the user selection for the type of item s/he wants to add.
• An appropriate message should
successfully”.
• Finally all -fields should be cleared to be empty.
fields clear. [2 marks]
• The value of ID -Field should be checked first if
NumberFormatException
number, and stop the processing of adding the item into the array. An appropriate
message should appear to inform the user
be added into the array"
the id field and returns true if it is a number or false if not.
(Copy Array Into File- Button)
• When the user clicks on the button, all the items in
be copied into a fil
• You have to use showEquipment()
• An appropriate message should appear to inform the user
copied successfully” into the file
• Use try.. catch statement to handle
error message in case the
(Show all items in the Array
• When the user clicks on the button, all the items in
should be copied into a
should appear to inform the user
(Exit- Button) [1 mark]
• When the user clicks on the
JFrame Attribute
- Title
- Border Layout
- 3 JPanels
Message: Array is
empty
- Button) [9 marks]
-field values for a certain type of item will be
addItem method should be used from
appear to inform the user that “the item is added
Write a void method that makes th
its value is not a
exception should be invoked/handled if the value is not a
that "ID should be a number;
array". Write a method that takes one argument which is the value of
[4 marks]
[4 marks]
Equipment reference
file (assign the of the file by yourself).
from Equipment class.
either that
or “the Array is empty”.
IOException exception, and display a simple
process failed.
Array- Button) [2 marks]
the Equipment
JArea in the second JPanel. An appropriate message
that “The array is empty”.
button, the program should terminate.
Figure 1
Page 4
Equipment class
the
number,
the item won't
should
“the items are
, reference
Second JPanel
Contains JArea
Third JPanel
Contains 4 buttons
M257 TMA Fall 13-14
Part 3 [10 marks]
1- According to the Part 1 & 2 scenario, can we make
your answer. [2 marks]
2- Consider the following Interface
public Interface availableInterface{
public boolean isAvailable();
public String availableStatus(); }
According to the Part 1 & 2 scenario, can
interface? Explain your answer
3- Source:
“ support for OpenMP
Carolin Wolf, Georg Dotzler, Ronald Veldema, Michael Philippsen
University of Erlangen-Nuremberg,
Group, Erlangen, Germany, 27th International Conference on Advanced Information
Networking and Applications Workshops (WAINA 2013), 2013
Using the AOU’s eLibrary facility and the internet, locate the
dates), Read the paper carefully
written in your own words. [6
Q1 Why do scientists use high level programming?
Q2. How does orientation helpful?
Q3. What are the problems caused by placing o
Q4. Why do we use the programming ?
Q5. What does CKM stand for and what is it responsible for?
Q6. What is the proposed solution?
Q7. What are JaMP and OpenMPstyl
Item class as an abstract class? Explain
the class Item implement the availableInterface
? answer. [2 marks]
OpenMP-style programming of GPU clusters in
Computer Science Department, Programming Systems
paper indicated
and answer ONLY 3 questions. The answers should be
marks]
s in the memory? (List one
OpenMPstyle?
“End of the Assignment”
Page 5

above (note the
. bjects one)
حل واجبات الجامعة العربية المفتوحة
اتصل : O544321455 - OO966544321455
واتس اب: 966544321455+
ايميل : a_al_shora@hot mail.com
سكايبي : a_al_shora

حل واجب (http://www.aswaqcity.com/thread1315139.html) 0.5.4.4.3.2.1.4.5.5 الجامعة العربية المفتوحة


حل واجبات الجامعة العربية المفتوحة O54.4.3.2.1.4.5.5 - OO96654.4.3.2.1.4.5.5
ايميل : a_al_shora @ h.o.t.m.ail.c.o.m
سكايبي: a_al_shora
واتس اب: OO96654.4.3.2.1.4.5.5