EBK JAVA PROGRAMMING
9th Edition
ISBN: 9781337671385
Author: FARRELL
Publisher: CENGAGE LEARNING - CONSIGNMENT
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 3, Problem 12RQ
Program Description Answer
The objects contain methods and data items, which are also known as fields.
Hence, the correct option is “d”.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
A subject that can modify or write to an object but not having the authority to read it is known as what?
Read-Only
Append
Execute
Read-Write
File ApplicationCentre.java, which contains classes ApplicationCentre and Student.
Introduction
Write a Java program to handle applications for universities admission providing a good user interface. This program should work as a Frame with the width = 500 pixels and the height = 500 pixels.
The tasks of this Java program:
- to enter information for a number of students
- to display in a separate window the information about all the students stored
- to display in another separate window the information for a selected student
Your Task In this assignment class Student encapsulates the student information relevant for universities admission: student name (just the family name), high school average and 3 universities chosen.
The admission is based on the high school average according to the following table:
University High school average for admission
Toronto 90
York 84
Brock 75
Guelph 76
Waterloo 88
McGill 90
Concordia 76
Laval 78
Macmaster 82
Western 80
Based on this table a method of…
In the project you created in previous activities. Add a class. Name it Student. That class should have student name (string), student grades (array of size 3). Create a DisplayInfo() function that displays the values of the member variables in the class.
In main, create an instance of that array and fill that instance with data. Call the DisplayInfo() function from main so it prints the content of the object.
A screenshot showing the code in Visual Studio and the output (on the console screen).
Activity 1 code
#include <iostream>
using namespace stdvoid main()
{cout << "Welcome to my world..." << endl;system("pause");
Chapter 3 Solutions
EBK JAVA PROGRAMMING
Ch. 3 - Prob. 1RQCh. 3 - Prob. 2RQCh. 3 - Prob. 3RQCh. 3 - Prob. 4RQCh. 3 - Prob. 5RQCh. 3 - Prob. 6RQCh. 3 - Prob. 7RQCh. 3 - Prob. 8RQCh. 3 - Prob. 9RQCh. 3 - Prob. 10RQ
Ch. 3 - Prob. 11RQCh. 3 - Prob. 12RQCh. 3 - Prob. 13RQCh. 3 - Prob. 14RQCh. 3 - Prob. 15RQCh. 3 - Prob. 16RQCh. 3 - Prob. 17RQCh. 3 - Prob. 18RQCh. 3 - Prob. 19RQCh. 3 - Prob. 20RQCh. 3 - Prob. 1PECh. 3 - Prob. 2PECh. 3 - Prob. 3PECh. 3 - Prob. 4PECh. 3 - Prob. 5PECh. 3 - Prob. 6PECh. 3 - Prob. 7PECh. 3 - Prob. 8PECh. 3 - Prob. 9PECh. 3 - Prob. 10PECh. 3 - Prob. 11PECh. 3 - Prob. 12PECh. 3 - Prob. 13PECh. 3 - Prob. 1GZCh. 3 - Prob. 2GZCh. 3 - Prob. 1CP
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Variables name: Choose meaningful and descriptive names. No x, y … etc. Use lowercase. If the name consists of several words, concatenate all in one, uselowercase for the first word, and capitalize the first letter of each subsequent word inthe name. For example, the variables radius and area, and the method computeArea.3. File type: only JAVA file is allowed. Name it as Assignment2. Java5. Please add the appropriate comments for each step you add. In the top of the program, addyour name, time of starting writing the code and title of the assignment. Extra informationwould be greatarrow_forwardthe progam is : Public Class Form1Public Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click'Declare variablesDim vHeight As DecimalDim vWeight As DecimalDim vBMI As Decimal 'get and test values entered by user'tests user has entered a value for heightIf txbHeight.Text = “” Or txbWeight.Text = “” Then'Call error message sub procedureErrorMessage(“Please enter your height and weight in the box!”)Exit SubEnd If 'Calculate Body Mass initialize variablesvWeight = Val(txbWeight.Text)vHeight = Val(txbHeight.Text)'Calculate Body Mass Index ^ is for exponentsvBMI = vWeight / (vHeight ^ 2) 'Output message to Label txbResult.Text = vBMI Call ErrorMessage()End Sub Public Sub ErrorMessage() 'public sub for error msg box End Sub Public Sub ErrorMessage(errormsg As String) ' parameter for error messageMessageBox.Show(errormsg) 'to show the message boxEnd Sub Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click 'close buttonClose() '…arrow_forwardThe xxx_Student class:– Name - the name consists of the First and Last name separated by a space.– Student Id – a whole number automatically assigned in the student class– Student id numbers start at 100. The numbers are assigned using a static variable in the Student class• Include all instance variables• Getters and setters for instance variables• A static variable used to assign the student id starting at 100• A toString method which returns a String containing the student name and id in the format below:Student: John Jones ID: 101 The xxx_Course classA Course has the following information (modify your Course class):– A name– An Array of Students which contains an entry for each Student enrolled in the course (allow for up to 10 students)– An integer variable which indicates the number of students currently enrolled in the course. Write the constructor below which does the following:Course (String name)Sets courseName to nameCreates the students array of size 10Sets number of…arrow_forward
- Create a program using a console application name "DragonKiller". The program should ask the user to enter his/her name and surname. Create a method name RemoveSpace() to remove space between the name and the surname entered by the user. Count the number of characters within the newly created string (nameSurname). The total number of characters (Name and Surname) should be used as the size of your arrayDragon (type integer). Populate your arrayDragon with a series of odd random numbers between 10 and 50.Display all arrayDragon elements and their corresponding indexes before executing. The insertionSort method allows the user to enter a value from the arrayDragon element to search for and be removed (Killed).• Loop through the array until you find the value (Use the binarySearch to locate the value with in your array) and kill that value from the arrayDragon. By replacing the value findDragon with a Zero (0)• Print out arrayDragon with the killed element. NBUse NetBeans to create this…arrow_forwardCreate a program using a console application name "DragonKiller". The program should ask the user to enter his/her name and surname. Create a method name RemoveSpace() to remove space between the name and the surname entered by the user. Count the number of characters within the newly created string (nameSurname). The total number of characters (Name and Surname) should be used as the size of your arrayDragon (type integer). Populate your arrayDragon with a series of odd random numbers between 10 and 50. Display all arrayDragon elements and they are corresponding indexes before executingthe insertionSort method. Allow the user to enter a value from the arrayDragon element to search for and be remover (Killed). Loop through the array until you find the value (Use the binarySearch to locate the value with in your array) and kill that value from the arrayDragon. By replacing the value findDragon with a Zero (0) Print out arrayDragon with the killed element.arrow_forwardCreate a program using a console application name "DragonKiller". The program should ask the user to enter his/her name and surname. Create a method name RemoveSpace() to remove space between the name and the surname entered by the user. Count the number of characters within the newly created string (nameSurname). The total number of characters (Name and Surname) should be used as the size of your arrayDragon (type integer). Populate your arrayDragon with a series of odd random numbers between 10 and 50.Display all arrayDragon elements and their corresponding indexes before executing. The insertionSort method allows the user to enter a value from the arrayDragon element to search for and be removed (Killed).• Loop through the array until you find the value (Use the binarySearch to locate the value with in your array) and kill that value from the arrayDragon. By replacing the value findDragon with a Zero (0)• Print out arrayDragon with the killed elementarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Introduction to Classes and Objects - Part 1 (Data Structures & Algorithms #3); Author: CS Dojo;https://www.youtube.com/watch?v=8yjkWGRlUmY;License: Standard YouTube License, CC-BY