Scenario MONASH UNIVERSITY WOULD LIKE TO CREATE AN APP TO MANAGE UNIT (SUBJECT) OFFERED BY FACULTY...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Scenario MONASH UNIVERSITY WOULD LIKE TO CREATE AN APP TO MANAGE UNIT (SUBJECT) OFFERED BY FACULTY IN EVERY SEMESTER. THIS APP WILL CONSIST THE DETAILS OF THE UNIT. YOU ARE REQUIRED TO DESIGN A JAVA CLASS FOR THE APP BASED ON THE SPECIFICATIONS AS BELOW TASKS Task 1 (W8 - 10 marks) Code the class shell and instance variables for unit offered in a faculty. The class should be called Unit. A Unit instance has the following attributes: unitCode: length of 7 characters (you can assume all unit code is 7 characters in length) unitName: length of 40 characters max credit Hour: represent by integer. Each unit has 6 credit hours by default unless specified. offer Faculty: length of 20 characters. It will be the name of the faculty that offer the unit (eg. Faculty of IT). offered ThisSemester?: Can be true or false (if true - offered this semester, if false - not offered) Task 2 (W8 - 5 marks) Code a non default three-parameter constructor with parameters for unit code, credit hour and offer faculty. Instance variables that are not taking parameter must be auto-initiliased with sensible default value. The constructor must utilise appropriate naming conventions and they protect the integrity of the class's instance variables. Task 7 (W8 - 5 marks) Write the main method code in a UnitDriver class that instantiates Unit objects to test successful and unsuccessful attempt as below. ==Successful Attempt= Unit Code: FIT1051 Offered Faculty: Faculty of IT Credit Hour: 6 Offered in this Semester? : true =======Unsuccessful Attempt======= Unit Code: null Offered Faculty: FIT Credit Hour: 0 Offered in this Semester? : true Code Readability (5 marks) Overall code submission must be well organised and very easy to follow included but not limited to code indentation, code consistency, effective use of whitespace etc. Task 6 (W8 - 10 marks) Code a two parameters method called customCreditHour that takes in a unit code and number of credit hours. This method should use the parameters and check if the first 3 character of the unit code is not "FIT", then accept the unit code and number of credit hours. If the first 3 character is "FIT", then it should prompt an error message "Error. This is FIT unit and the no of credit hours is 6 by default" e.g. calling the method customCreditHour("FIT1051", 12) will return "Error. This is FIT unit and the no of credit hours is 6 by default" . Declare your variables as appropriate. You may assume any unit which is not offered by FIT should not be 6 credit hours by default. Task 7 (W8 - 5 marks) Write the main method code in a UnitDriver class that instantiates Unit objects to test successful and unsuccessful attempt as below. ======Successful Attempt=: Unit Code: FIT1051 Offered Faculty: Faculty of IT Credit Hour: 6 Offered in this Semester?: true =======Unsuccessful Attempt======= Unit Code: null Offered Faculty: FIT Task 3 (W8 - 5 marks) Code the getter/accessor methods for all the instance variables in task 1. Task 4 (W8 - 20 marks) Code the setter/mutator methods for all the instance variables in task 1and at least one of the method should return a boolean to indicate the success or failure of the mutation. The code must protect the integrity of the class's instance variables as required and utilise appropriate naming conventions. Task 5 (W8 - 5 marks) Code a toString method for the class that output as below. Unit Code: FIT1051 | Offered Faculty: Faculty of IT Credit Hour: 6 Offered in this Semester? : true Task 6 (W8 - 10 marks) Code a two parameters method called customCreditHour that takes in a unit code and number of credit hours. This method should use the parameters and check if the first 3 character of the unit code is not "FIT", then accept the unit code and number of credit hours. If the first 3 character is "FIT", then it should prompt an error message "Error. This is FIT unit and the no of credit hours is 6 by default" Scenario MONASH UNIVERSITY WOULD LIKE TO CREATE AN APP TO MANAGE UNIT (SUBJECT) OFFERED BY FACULTY IN EVERY SEMESTER. THIS APP WILL CONSIST THE DETAILS OF THE UNIT. YOU ARE REQUIRED TO DESIGN A JAVA CLASS FOR THE APP BASED ON THE SPECIFICATIONS AS BELOW TASKS Task 1 (W8 - 10 marks) Code the class shell and instance variables for unit offered in a faculty. The class should be called Unit. A Unit instance has the following attributes: unitCode: length of 7 characters (you can assume all unit code is 7 characters in length) unitName: length of 40 characters max credit Hour: represent by integer. Each unit has 6 credit hours by default unless specified. offer Faculty: length of 20 characters. It will be the name of the faculty that offer the unit (eg. Faculty of IT). offered ThisSemester?: Can be true or false (if true - offered this semester, if false - not offered) Task 2 (W8 - 5 marks) Code a non default three-parameter constructor with parameters for unit code, credit hour and offer faculty. Instance variables that are not taking parameter must be auto-initiliased with sensible default value. The constructor must utilise appropriate naming conventions and they protect the integrity of the class's instance variables. Task 7 (W8 - 5 marks) Write the main method code in a UnitDriver class that instantiates Unit objects to test successful and unsuccessful attempt as below. ==Successful Attempt= Unit Code: FIT1051 Offered Faculty: Faculty of IT Credit Hour: 6 Offered in this Semester? : true =======Unsuccessful Attempt======= Unit Code: null Offered Faculty: FIT Credit Hour: 0 Offered in this Semester? : true Code Readability (5 marks) Overall code submission must be well organised and very easy to follow included but not limited to code indentation, code consistency, effective use of whitespace etc. Task 6 (W8 - 10 marks) Code a two parameters method called customCreditHour that takes in a unit code and number of credit hours. This method should use the parameters and check if the first 3 character of the unit code is not "FIT", then accept the unit code and number of credit hours. If the first 3 character is "FIT", then it should prompt an error message "Error. This is FIT unit and the no of credit hours is 6 by default" e.g. calling the method customCreditHour("FIT1051", 12) will return "Error. This is FIT unit and the no of credit hours is 6 by default" . Declare your variables as appropriate. You may assume any unit which is not offered by FIT should not be 6 credit hours by default. Task 7 (W8 - 5 marks) Write the main method code in a UnitDriver class that instantiates Unit objects to test successful and unsuccessful attempt as below. ======Successful Attempt=: Unit Code: FIT1051 Offered Faculty: Faculty of IT Credit Hour: 6 Offered in this Semester?: true =======Unsuccessful Attempt======= Unit Code: null Offered Faculty: FIT Task 3 (W8 - 5 marks) Code the getter/accessor methods for all the instance variables in task 1. Task 4 (W8 - 20 marks) Code the setter/mutator methods for all the instance variables in task 1and at least one of the method should return a boolean to indicate the success or failure of the mutation. The code must protect the integrity of the class's instance variables as required and utilise appropriate naming conventions. Task 5 (W8 - 5 marks) Code a toString method for the class that output as below. Unit Code: FIT1051 | Offered Faculty: Faculty of IT Credit Hour: 6 Offered in this Semester? : true Task 6 (W8 - 10 marks) Code a two parameters method called customCreditHour that takes in a unit code and number of credit hours. This method should use the parameters and check if the first 3 character of the unit code is not "FIT", then accept the unit code and number of credit hours. If the first 3 character is "FIT", then it should prompt an error message "Error. This is FIT unit and the no of credit hours is 6 by default"
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Predictive text entry systems are familiar on touch screens and mobile phones. This question asks you to consider how the same principles might be used in a programming editor for creating Java code....
-
Draw the array's dimensions and contents of the following initialized two-dimensional arrays: 1) 2) int[][] arr1= new int [3] [4]; arr1 [0] [1]-5; arrl [0] [2] = 10: arrl [1] [2]-7; arri [0] [3] = 9;...
-
Mower-Blower Sales Co. started business on January 20. 2016. Products sold were snow blowers and lawn mowers. Each product sold for $1,400. Purchases during 2016 were as follows: The December 31,...
-
A buyer with a 20-year, $419,000 loan at a 4.25% interest rate has a monthly principal and interest payment totaling $2,594.59. If $1,483.95 is interest, how much is applied toward principal for that...
-
The bookkeeper of Lone Star Landscaping, Inc., prepared the companys balance sheet while the accountant was ill. The balance sheet contains numerous errors. In particular, the bookkeeper knew that...
-
On September 11, 2012, Home Store sells a mower for $500 with a one- year warranty that covers parts. Warranty expense is estimated at 8% of sales. On July 24, 2013, the mower is brought in for...
-
You are an art salesperson whose job is to sell paintings. You sell paintings at art festivals, as well as out of your studio on non- festival days Festivals occur once every 20 days and there is...
-
Name the bones of the pectoral girdle and upper limb?
-
An Expert Witness can be anyone with knowledge or experience of a particular field or discipline beyond that to be expected of a layman. The Expert Witness's duty is to give to the Court or tribunal...
-
Simplify the radical expression, using absolute value bars if needed. 10(2x)10
-
Darla is really a nice girl. I like her, honestly," said housekeeping team supervisor Wendy Smith, "but she's driving me crazy." "What's wrong?" asked Janis Fredericks, Wendy's friend from the...
-
In this week's discussion board we are going to examine how the industry trends that are impacting health care organizations determine the skills and abilities that a health care manager needs to be...
-
= A metallic solid (density p= 4000 kg/m, specific heat C, = 150 J/kg/K, thermal conductivity k =10 W/m/K) spherical particle of diameter 500 um moves through a gas in a chamber at a speed of 5 m/s....
-
The melting point of iron metal is 1535 C. The vapor pressure of solid iron is reported to be 1.97*10-4 atm at 1496 C. Estimate the number of gaseous iron atoms per cubic centimeter in equilibrium...
-
5. 25 A linkage consists of four components x,x, x3, and x assembled in series. The lengths of each component are normally distributed with the following parameters: = 2.0, o = 0.0004, = 4.5, o =...
-
Medi-Exam Health Services, Inc. (MEHS), located in a major metropolitan area, provides annual physical screening examinations, including a routine physical, EKG, and blood and urine tests. MEUS's...
-
AIG, an international insurance and financial services organization, recently announced that the performance of employees would be rated on a scale from 1 to 4. The top 10% of employees would receive...
-
In 2012, 79% of Southwest Airlines flights arrived at their destinations on time. Suppose a random sample of 12 Southwest Airlines flights was selected. a. What is the probability that all 12 flights...
-
Herr Foods, a producer of a variety of salty snacks, performs taste tests to compare how consumers react to its products. A product such as horseradish cheddar chips is considered a polarizing...
-
A cylindrical tank of methanol has a mass of \(60 \mathrm{~kg}\) and a volume of \(75 \mathrm{~L}\). Determine the methanol's weight, density, and specific gravity. Take the gravitational...
-
A mass of \(0.5-\mathrm{kg}\) of argon is maintained at \(1400 \mathrm{kPa}\) and \(40^{\circ} \mathrm{C}\) in a tank. What is the volume of the tank?
-
The air in an automobile tire with a volume of \(0.015 \mathrm{~m}^{3}\) is at \(30^{\circ} \mathrm{C}\) and \(140 \mathrm{kPa}\) (gage). Determine the amount of air that must be added to raise the...
Study smarter with the SolutionInn App