Write a statement to create an array, named productList, in a supportive class, with a size of TEN and a data type of String: Question 7 (Mandatory) Write an invoke statement for the currentCircle object from the Circle class, to the behavior setCircleRadius, that invokes validateRadius in the parameters, which passes input in the parameters: ) ): Question 8 (Mandatory) Write a test condition for a selection structure that tests the values of the Strings named, userName and borrowedUserName, where case matters and the results will be -1, 0 or 1: Question 9 (Mandatory). Write a test condition for a selection structure that tests the values of the Strings named, userName and borrowedUserName, where case does not matter and the results will be true or false:
Q: use the design pattern for collecting objects. We are going to model a Orchard with trees. An…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: 3. Design a user-defined class called Course. Each course object will hold data about a course. The…
A: Please check the step 2 for solution
Q: Q. Create a class 'Student' with three data members which are name, age and address. The constructor…
A: //C++ program #include<iostream> using namespace std; //Student class class Student{…
Q: Create a RightTriangle class given the following design: RightTriangle variables: base, height…
A: Step 1:- Program Approach:- 1.Create the class RightTriangle 2.Date member are:- base height…
Q: create a class rectangle with attributes length and width both encapsulated, each of which defaults…
A: Program code: File name: "Rectangle.java" //import the required packages import…
Q: Question 1: 1.1) Implement the book class that includes data values that describe various…
A: Question given: Write a program that create a class Book, and another class Dictionary inherited…
Q: Create a class Student with following data members, name, roll, and marks as private data member.…
A: Given: Create a class Student with following data members, name, roll, and marks as private…
Q: In a course, a teacher gives the following tests and assignments: • A lab activity that is observed…
A: In this question, we are going to find the graded activity that occurs when we assigned the…
Q: Exercise: Exercises Write a class named Octagon that extends GeometricObject and implements the…
A: The program is written in java
Q: Write the Java code corresponding to the following UML diagram. The class School implements the…
A: Solution: Programming language used: Java Program in Java: (Note: all solution steps are…
Q: Design a new Account class as follows:■■ Add a new data field name of the String type to store the…
A: The following java program that prints an account summary that shows the account holder name,…
Q: 10. Write a class for 'LabRoom'; it will have member fields for no of chairs, no of tables, no of…
A: I give the code in java along with output and code screenshot
Q: Pick an object around you and create a class out of it - plan your class (Name, Parameters,…
A: EXPLANATION: - The Student class comprises of one constructor to initialize the instance attribute…
Q: Design a class named MyPoint to represent a point. The class contains: ➤ Two double private data…
A:
Q: In the Theater constructor you need to instantiate each seat object based upon the information…
A: #include <iostream> #include<iostream> using namespace std; typedef struct node {…
Q: Create a class Employee that has a field for storing the complete name of the employee (first and…
A: Create a class Employee that has a field for storing the complete name of the employee (firstand…
Q: Design the class doctorType, inherited from the class personType with an additional data member to…
A: As per our company guidelines, we are not supposed to answer more than 3 subparts of question and…
Q: Create a class called Student that models a student at Carleton University. A student's state…
A: public class Main { public static void main(String[] args) { Student s = new Student("cat",…
Q: Task 2: abstract Class: TwoDimensionShape Create an abstract class called "TwoDimensionShape", which…
A: Objective: An abstract class TwoDimensionalShape would be developed implementing the interface…
Q: (New Account class) An Account class was specified in Programming Exercise 9.7. Design a new Account…
A: Solution - Test Program Given in the question: we have to make two classes Account and Transaction…
Q: Siven a class Point2D and an abstract class Shape2D: from_future_ import annotations from abc import…
A: from __future__ import annotations from abc import ABC, abstractmethod from dataclasses import…
Q: Create a class called Airport that models an airport. An airport's state consists of its name…
A: We need to create an Airport class in Java that has 3 data members as- name, code, and list of…
Q: for the class Student that contains 3 attributes: name, studentNumber and course. You are to…
A: package anagram;public class Student{ private String name; private int studentNumber;…
Q: Create an abstract class named Element that holds properties of elements, including their symbol,…
A: public abstract class Element{ String symbol; int atomicNumber; double atomicWeight;…
Q: You are required to design an Movie class which has following attributes String name;…
A: import java.io.*;class Movie{ // attributes private String name; private String Director;…
Q: reate a Student Object project. Create a Student class and use the provided UML diagram to code the…
A: In this question, a class is created in C++ language with the name testStudents. Methods and…
Q: Let’s assume you are creating a game where multiple players are involved. You will create a Player…
A: Given: Let’s assume you are creating a game where multiple players are involved. You will create a…
Q: Create a class called Student that models a student at Carleton University. A student's state…
A: package com.company;import java.util.Scanner;public class Main { public static void main(String[]…
Q: rite a java program that uses a structure to store the information about the Items in a retail…
A: Below is the required java program. Program Approach: Import necessary packages to get the…
Q: 1. Create a Student class that implements the Person interface. As well as storing the students name…
A: Answer :
Q: Fill in the blanks to create a proper mutator method for the cart attribute in the code below. All…
A: Let us see the mutator method details below.
Q: ) Create an enumeration named Departments that contain four sets of values FINANCE, HR, IT, and…
A: Actually, string is a sequence of characters.
Q: A sample Student class. Fields are name and marks (float). A static field is passLimit (how many…
A: static variables in java programming : The static variables are non-instance variables that are…
Q: Create a "house" class that initializes house objects in the following way :…
A: """Program to create a class house, intialze it, get user monthly saving and display monthsneeded to…
Q: The Point2D should store an x and y coordinate pair, and will be used to build a new class via class…
A: ANSWER: Point2D: In this program we make a Point2D object named point2d_1 by utilizing its x, y…
Q: Create a Student Object project. Create a Student class and use the provided UML diagram to code…
A: java program is an given below : Student.java import java.util.Random; import java.util.Scanner;…
Q: Define the Circle2DYourLastName class that contains: Two double data fields names x and y that…
A: Actually, array is a collection of elements. two types of arrays 1D array 2D array.
Q: Write all constructors and setters getters for that class. Also overload the following operators:…
A: To write a class MyClass and to include all attributes. A constructor in C++ is a special method…
Q: 1. Consider the below class diagram, use StarUML to reproduce the diagram and generate the source…
A: Soution 1):--Given class diagram to reproduce it as follows:--
Q: Provide a method addAttempt(int stId, String stName, double marks) a. This method creates an…
A: import java.util.*; public class Main{ public static void main(String[] args){ //create an…
Q: Generate a class called CourtJester(). This object should inherit all attributes and methods from…
A: The question asks designing the 2 classes named Kingdom and CourtJester as described. The class…
Q: Assignment Details: For this lab you need to continue editing lab sheet2 , QuadraticEquation Class:…
A: A quadratic equation is in the form ax2 + bx + c. The roots of the quadratic equation are given by…
Q: Creates a class called College with 6 attributes: a. maxStud: a maximum number of Student into the…
A: Note: As no programming language is mentioned. So I am using Java to answer this question.
Q: Create a class to compute the average grade (out of 10) of the students based on their grades in…
A: Objective: This program should include a class to store grades of five exams of students. It should…
Q: Design a user-defined class called Course. Each course object will hold data about a course. The…
A: Program Approach: 1- As mentioned in the assignment, there is two class that required a student…
Q: Test the defined class by performing the following operations in a main function: • create a list…
A: Create hero class with necessary details Add str function to print details in given format create…
Q: 10.11 (Geometry: the Circle2D class) Define the Circle2D class that contains: 1 Two double data…
A: The program contains the instructions to solve the problems and returns the result. The main…
Q: 1 Create a module named numericquestions. Inside the comdule create NumericQuestion class as a…
A: Answer: our instruction is answer the first three part from the first part and . I have attached…
Q: Write a class Student with the following attributes (make sure the attributes are private using name…
A:
Q: Design and implement a Java class named Book with two data members: title and price. The class…
A: Class Book contains basic details about book and getter/setter method. Class BookShelf contains an…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Create a program named FriendList that declares an array of eight Friend objects and prompts the user to enter data about the friends. Display the Friend objects in alphabetical order by first name. The Friend class includes auto- implemented properties for the Friend’s name, phone number, and three integers that together represent the Friend’s birthday—month, day, and year. 9. b. Create a FriendBirthday program that modifies the FriendList program created in Exercise 9a so that after the list of Friend objects is displayed, the program prompts the user for a specific Friend’s name and the program returns the Friend’s phone number and birthday. Display an appropriate message if the friend requested by the user is not found. 9. c. Create a program named AllFriendsInSameMonth that modifies the program in Exercise 9b so that after the requested Friend’s birthday is displayed, the program also displays a list of every Friend who has a birthday in the same month. C#…1. Create a class Employee with parameters name, id, designation, and basicSalary. Use appropriate datatypes and access specifiers. Use default constructor to create objects of employee. Write methods toset and get the values of parameters of employee. Write methods to find total salary of employee andto display the complete details of employee along with total salary. Create another class TestEmployeewhich creates array of n number of employees, uses appropriate set methods to set the values ofparameters of every employee. Display the details of each employee. (Total salary = basic salary + 80%of basic salary)Design and implement a Java class named Book with two data members: title and price. The class should have suitable constructors, get/set methods, and the toString method. Design and implement another Java class named BookShelf which has an ArrayList data member named bookList to store books. The class should have suitable constructors, get/set methods, and the toString method, as well as methods for people to add a book (prototype: addBook(Book book)), remove a book (prototype: removeBook(Book book)), and search for a book (prototype: findBook(Book book)). Test the two classes by creating a Bookshelf object and five Book objects. Add the books to the bookshelf. Display the contents of the bookshelf. Test the removeBook and findBook methods as well. Take screenshots of your tests and submit them with your Java code (not the whole project)
- Create a class Department with attributes DName, DID, a dynamic listDTeachers of type string.Write accessors and mutators for all data membersand show function to show all data members.Create nullaryand parameterized constructors to initialize the data members.Also write a copy constructor for Department class.In main() create a dynamic array of departments, Use loop to create four objects in the dynamic array. All the even indexed objects should be created with nullary constructors and thencall the accessors and mutators to initializethe objects while, all the odd indexed objects should be initialized using parameterized constructors. Create four copy objects from array using copy constructors.Call the show function to show the four objects.1.1 Create a Student Object project. Create a Student class and use the provided UML diagram to code the instance fields, constructors and methods. Note: The module mark is the average of the participation mark and the examination mark - calculate this using the calcModuleMark() method. The determineStNumber() method should compile a student number with the first 3 letters of the student's name, a '#' symbol, and a 3-digit randomly generated number (make use of a for-loop to concatenate these 3-digits). The stNumber data field should be set in the constructor by calling the determineStNumber() method. The toString() method must compile a string to display the student number, participation mark, examination mark, and module mark, formatted in table format. Student number PMark EMark MMarkMar#9186 81 64 72.00 1.2 Create a testStudents class. Do the following: -Write a static method called display() which receives the Student object as a…Create a class Student with following data members, name, roll, and marks as private data member. Create array of objects for three students, compare their marks but make sure allocating memory to all the objects during run time only and display the records of the student who is getting highest score.
- Design a new Account class as follows:■■ Add a new data field name of the String type to store the name of thecustomer.■■ Add a new constructor that constructs an account with the specified name, id,and balance.■■ Add a new data field named transactions whose type is ArrayList thatstores the transaction for the accounts. Each transaction is an instance of theTransaction class, which is defined as shown in Figure ■■ Modify the withdraw and deposit methods to add a transaction to thetransactions array list. Write a test program that creates an Account with annual interest rate 1.5%,balance 1000, id 1122, and name George. Deposit $30, $40, and $50 to theaccount and withdraw $5, $4, and $2 from the account. Print an account summarythat shows the account holder name, interest rate, balance, and all transactions.(In java please) ( NO TOY CLASS PLEASE READ INSTRUCTION OR DOWN VOTE PLEASE LOOK AT TWO IMAGES BELOW YOU NEED THEM TO FINISH) THIS A LinkNode structure or class which will have two attributes - a data attribute, and a pointer attribute to the next node. The data attribute of the LinkNode should be a reference/pointer of the Currency class of Lab 2. Do not make it an inner class or member structure to the SinglyLinkedList class of #2 below. A SinglyLinkedList class which will be composed of three attributes - a count attribute, a LinkNode pointer/reference attribute named as and pointing to the start of the list and a LinkNode pointer/reference attribute named as and pointing to the end of the list. Since this is a class, make sure all these attributes are private. The class and attribute names for the node and linked list are the words in bold in #1 and #2. For the Linked List, implement the following linked-list behaviors as explained in class -…Write a program to computerize the billing system of a hospital. a) Design the personType class as shown below: PersonTye -firstname: String -lastname: String +print(): void +setNAme(string, string) : void +getFirstName() : string +getLastName() : string +abstract personType(): string b) Design the class doctorType, inherited from the class personType with an additional data member to store a doctor’s speciality. Add appropriate constructors and member functions to initialize, access, and manipulate the data members and this class should implement abstract method of class PersonType. c) Design the class billType with data members to store a patient’s ID and a patient’s hospital charges, such as pharmacy charges for medicine, doctor’s fee, and room charges. Add appropriate constructors and member functions to initialize and access and manipulate the data members. d) Design the class patientType, inherited…
- 1. Construct a class Assessment with the following attributes a. Id (int) b. Topic(String) c. MaxMarks(double) d. Date of conduct (doc) (GregorianCalendar) e. attempts ArrayList <Attempt> //an array list that will contain the Attempts objects 2. In order to complete the above class you will have to write a class Attempt with the following attributes. This class represents the attempts that students have made against this assessment. a. studentId(int) b. studentName(String) c. marksObtained(double) 3. Provide constructor in Attempt class with values for all attributes 4. Provide getters and setters for each 5. Provide a toString method that produces the following string Student = --id-- : name Marks Obtained : --marks— 6. Now complete the Assessment class through Following steps a. Provide a parameterized constructor with arguments for all except the array list i. Instantiate the arraylist in the constructor along with other variables b. Provide getters for all except the…Creates a class called College with 6 attributes: a. maxStud: a maximum number of Student into the college; b. nbStud: the current number of Student into the college. When a College is created, the number nbStud is equal to 0; c. Student Stud[]: an array of Student. The size of this array is equal to maxStud; d. maxPhdStud: a maximum number of PhDStudent into the college; e. nbPhdStud: the current number of PhDStudent into the college. When a College is created, the number nbPhDStud is equal to 0; f. Student PhdStud[]: an array of PhDStudent. The size of this array is equal to maxPhdStud. Add the following methods: a. add(Student): able to add a Student to the College. The Student will be added to the Stud array if there are an available space; b. overload the operator += (PhDStudent): able to add a PhDStudent to the College. The PhDStudent will be added to the PhdStud. You need to be sure that an available space exits (uses the function assert ); c. find(supervisorName): this method…Create a class called Student that models a student at Carleton University. A student's state consists of a name (String), id number (int) and a list of grades (array of doubles). Your class must have a constructor that has three input parameters (name, id and grade list) and sets the initial state for the object. Include a toString() method that returns a useful string representation of a student object. The string representation should contain the student's name, ID number, and the number of grades they have recorded (so NOT include all the grades). Include a gradesInRange(double lower, double upper) method that returns the number of grades that this student has that are in the range [lower,upper]. That is, the it returns the number of grades that are greater than or equal to lower and less than or equal to upper. Example Usage: Student s = new Student("cat", 100123987, new double[]{81.2, 93.2, 76,2, 84.6});int num_A_grades = s.gradesInRange(80,100);// assert num_A_grades will be 3