Make one project consisting of only one main class and three other classes. For each of the classes you create you need to use the constructor to set its attributes. Your classes have to have setters and getters and their attributes should all be private. Create a class University A university has the following attributes. 1. A university name (string) 2. A university population (int) 3. A university budget(double) Create a class Department This class has 2 attributes: 1. Dep_Name(string) 2. Dep_ID(int) Create a class Student A student has the following attributes. 1. An ID(int) 2. A Name(string) 3. A DEP_ID(int) In the main class first Create three departments.Ask the user to input the field values. In the main class create 5 students. Ask the user to input the field values. Write a function in the main class that takes two integers as input and Checks if they are equal. Use that function to check if for a department and a student their DEP ID is equal. (So you have to check if dep1.di=student1.id for example). Create a university in the main again. (Initialize it the way you like). DO NOT ASK THE USER HAVE THEM DEFINED YOUR SELF SO NO SCANNER. In the main class ask the user to input a string. Then until you have reached the end of the string iterate on each char and replace each char at location i (the location you are at in that iteration) with the following: If the location was an even location replace it with the lowercase version of the char and if it was odd replace it with its upper case. Example: heLlo: hElLo.

Question

Please help with the following Computer Science question:

Code in Java, do not use arrays and try keeping the classes simple so I can understand. Add comment or documentation. 

Make one project consisting of only one main class and three other classes. For each of the classes you create you need to use the constructor to set its attributes. Your classes have to have setters and getters and their attributes should all be private.

Create a class University

A university has the following attributes.

1. A university name (string)
2. A university population (int)
3. A university budget(double)

Create a class Department

This class has 2 attributes:

1. Dep_Name(string)
2. Dep_ID(int)

Create a class Student

A student has the following attributes.

1. An ID(int)
2. A Name(string)
3. A DEP_ID(int)

In the main class first Create three departments.Ask the user to input the field values.

In the main class create 5 students. Ask the user to input the field values.

Write a function in the main class that takes two integers as input and Checks if they are equal. Use that function to check if for a department and a student their DEP ID is equal. (So you have to check if dep1.di=student1.id for example).

Create a university in the main again. (Initialize it the way you like). DO NOT ASK THE USER HAVE THEM DEFINED YOUR SELF SO NO SCANNER.

In the main class ask the user to input a string. Then until you have reached the end of the string iterate on each char and replace each char at location i (the location you are at in that iteration) with the following: If the location was an even location replace it with the lowercase version of the char and if it was odd replace it with its upper case. Example:

heLlo: hElLo.

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Object Oriented Programming

Java

Programing Language

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: Write while loops to do the following: Repeatedly print the value of the variable xValue, decreasin...

A: A while loop is an entry controlled loop, in which the condition is checked first before enter into ...

Q: Describe a privacy issue so serious that it would case you to stop using Facebook.

A: Privacy Issue :  The privacy issue is really an important thing to discuss about when it comes to pe...

Q: Database design, I have to design an ERD of my own and make it in 3NF (third normal form) I am not s...

A: NORMAL FORM OF THE ERD The given ERD has 4 tables. Each table has its own primary key. The three dep...

Q: Employee (you should define three attributes for employee and manager names)   Name                 ...

A: 1) Select employee_name, manager_name from Manages   employee_name         manager_name      start_d...

Q: There are nine key components of an e-commerce process architecture that is the foundation of the e-...

A: E-commerce: E-commerce refers to electronic commerce and buying and selling activities of products ...

Q: Štack is a linear data structure which follows a dynamical order in preforming operations, LIFO. In ...

A: Actually, stack is a linear data structure which follows a dynamical order in performing operations ...

Q: What are the correct answers to these questions?

A: Which is a primary principle of the Rapid Application Development methodology? Rapid Application De...

Q: Suppose that a C++ int variable x is associated with register $t1. Write the MIPS I instruct corresp...

A: Actually, register is a used to store small amount of data.

Q: 2.For each of the following relations with given functional dependencies, @Calculate canonical cover...

A: NOTE: According to the rules, only question (a) is to be answered (i) Fc is called a canonical cover...

Q: Course:Compiler Design

A: 1. (a) Write a grammar for parsing the string a=b/(c-d)*(x+y) Let S be the starting of the grammar. ...

Q: Height is in ___________ nature and can usually be _____________. Select one: a.  digital, measu...

A: Height is Digital in Nature and it can be measured. we can not count height.   a.  digital, measured...

Q: Please finish fast but accurate.Thank you!

A: Solution: Given, Two different implementations of same instruction set architecture.

Q: Declare an array of 20 unsigned bytes named bArray and initialize all elements to zero

A: bArray BYTE 20 DUP(0)

Q: Computer Science Question

A: Aggregate Functions: SQL has some built-in functions and they are called as aggregate functions. SQ...

Q: Draw the Dependency Diagram that is in 3NF for each relation. For each relation show the level of No...

A: Although Second Normal Form (2NF) relations have less redundancy than those in 1NF, they may still s...

Q: 2) Explain, which is the operation of following code fragment, W in C language INCLUDE "P18F242.INC"...

A: Actually, fragment is a small part of broken off, or separated  from something.

Q: Q IN PICTURE

A: (X + Y)' = X'Y', means that, logically, there is no difference between: a NOR and an AND gate with i...

Q: need help with this python recursion question. why is 4? please explain clear on each steps , please...

A: Introduction of the Program: The python program is an example of a recursive function and a recursiv...

Q: int main(){Book * book1 = new Book("Learning Python","David Ascher");Book * book2 = new Book("C++ Pr...

A:   class IndexItem {public:virtual int count() = 0;virtual void display()= 0;}; class Book : public I...

Q: Computer Science Question

A: Consider the following query to display the most expensive book in the FACT system: Query:  select ...

Q: A personal phone directory contains room for first names and phone numbers for 30 people. Assign nam...

A: Since you have not mentioned the programming language. I am attempting this in java. if you need it ...

Q: Question4: Show the stack with all activation record instances, including static anddynamic chains, ...

A: all activation record instances of above code is in step 2.

Q: Assume a CPU has 8 registers (3 bits), 32 op-codes (5 bits), 15-bit addresses, 16-bit integers. Whic...

A: Introduction to register:   The registers store data elements for processing without having to acces...

Q: Write a program that contains two instructions: (1) add the number 5 to the EAX register, and (2) ad...

A: Actually, program is a executable software that runs on a computer. given ,information is  (1) add t...

Q: What are RAID (0 + 1) and (1 + 0)? Explain the difference between them.

A: RAID stands for Redundant Array of Inexpensive Disks. It is a way of logically putting multiple disk...

Q: Please help with the following question: If an error is detected with a parity bit, is it possibl...

A: Parity bit is Error Detection code only. It can not correct errors. because it can detect an odd num...

Q: Develop simple  PL/SQL programs a) Create a while loop that print all ODD numbers (1,3,5,7, etc) in...

A: Below is required PL/SQL programs: - 1(a) Program to print the odd numbers between 0 and 25(inclusiv...

Q: #8 Perform a two deletions on the following binary heap. Enter the resultingheap and draw the heaped...

A: Given Array: {2, 3, 4, 8, 9, 12, 9, 10} Forming Min heap from the array: Note: Since your are not m...

Q: Develop PL/SQL program Create a program that asks for an instructor ID. Find a) the full name of the...

A: a) DECLARE    CURSOR x_inst_info IS    SELECT inst_id                first_name                last_...

Q: 4. Define Memory space and Memory map. 5. Define Bus contention.

A: Actually, memory is used to stores the data.

Q: Write in Java code

A: You need to generate random numbers from 1 to 6 for computer and player Count all the occurrences Fi...

Q: Your posed questions should be two different choices from: Provide a scenario that presents either a...

A: Actually, python is a easiest programming language. It has a concise(less) code. It is a object orie...

Q: This JAVA program prompts the user to enter the current month, using 1 for January, 2 for February.....

A: 1. Create a class Rainfall. Declare two integer variables to hold the month and average as shown.   ...

Q: Programming language C#

A: Actually, program is a executable software that runs on a computer.

Q: import java.util.ArrayList;import java.util.Arrays; public class PS07A{/*** Write the method named m...

A: Actually, array is a collection of elements.

Q: Write the JAVA methods for the following. Rotate a Line Rotate a Rectangle Rotate a Triangle Rotate...

A: Rotate a Line import acm.program.*;import acm.graphics.*;import java.lang.Math; public class rotatin...

Q: 3. Decomposition – 3NF. Consider relation R=(ABCDEFG), F={AB→AC, BC→AE, AD→BCE}. (a) Is it in 3NF? P...

A: F={AB→AC,BC→AE,AD→BCE} Closure of F (F+)={A,B,C,D,E} The candidate key is the set of attributes that...

Q: .What is DataTable in ADO.NET?

A: Solution:  IN ADO.Net  The data table objects are useful in representing tables in the data set.A D...

Q: Hi! I need help writing out the pseudocode and codes for these programs. All instructions are includ...

A: Actually, python is a easiest programming language. It has a concise(less) code, It is a structural ...